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.
This commit is contained in:
marty
2010-11-20 18:01:38 +13:00
parent e1abd4d373
commit a72cb80337

View File

@@ -2530,7 +2530,7 @@ endfunction
" FUNCTION: s:findAndRevealPath() {{{2 " FUNCTION: s:findAndRevealPath() {{{2
function! s:findAndRevealPath() function! s:findAndRevealPath()
try try
let p = s:Path.New(expand("%")) let p = s:Path.New(expand("%:p"))
catch /^NERDTree.InvalidArgumentsError/ catch /^NERDTree.InvalidArgumentsError/
call s:echo("no file for the current buffer") call s:echo("no file for the current buffer")
return return