From a72cb803379357ad0f63b5da55e1590b16f92ef6 Mon Sep 17 00:00:00 2001 From: marty Date: Sat, 20 Nov 2010 18:01:38 +1300 Subject: [PATCH] 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. --- plugin/NERD_tree.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index c5a014c..bce9ca6 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -2530,7 +2530,7 @@ endfunction " FUNCTION: s:findAndRevealPath() {{{2 function! s:findAndRevealPath() try - let p = s:Path.New(expand("%")) + let p = s:Path.New(expand("%:p")) catch /^NERDTree.InvalidArgumentsError/ call s:echo("no file for the current buffer") return