commit 8e06723c04ac2bf2d4b28a7ccffb0798dea0659e
parent 4f1e6ecb057fc0bac189171c1430d71ef25f6bb1
Author: Xuyuan Pang <xuyuanp@gmail.com>
Date: Mon, 1 Sep 2014 16:25:27 +0800
fix #363
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/nerdtree/creator.vim b/lib/nerdtree/creator.vim
@@ -43,6 +43,10 @@ endfunction
function! s:Creator.createPrimary(name)
let path = self._pathForString(a:name)
+ if path == {}
+ return
+ endif
+
"if instructed to, then change the vim CWD to the dir the NERDTree is
"inited in
if g:NERDTreeChDirMode != 0
@@ -240,7 +244,7 @@ function! s:Creator._pathForString(str)
let path = g:NERDTreePath.New(dir)
catch /^NERDTree.InvalidArgumentsError/
call nerdtree#echo("No bookmark or directory found for: " . a:str)
- return
+ return {}
endtry
endif
if !path.isDirectory