Skip to content

Commit a72cb80

Browse files
committed
fix a bug with :NERDTreeFind and symlinks
Previously, if we called NERDTreeFind for a file that was inside a symlinked dir (when vims CWD was above that dir) then it would get confused by the symlink and fail. Use :p with expand to get around this.
1 parent e1abd4d commit a72cb80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/NERD_tree.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -2530,7 +2530,7 @@ endfunction
25302530
" FUNCTION: s:findAndRevealPath() {{{2
25312531
function! s:findAndRevealPath()
25322532
try
2533-
let p = s:Path.New(expand("%"))
2533+
let p = s:Path.New(expand("%:p"))
25342534
catch /^NERDTree.InvalidArgumentsError/
25352535
call s:echo("no file for the current buffer")
25362536
return

0 commit comments

Comments
 (0)