nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit 2cd4331b7837a16daa12858a32cf85fc49366683
parent 5442d5e04ad3c43d05f4d74b34d8ec2b9eb47fb8
Author: Jason Franklin <j_fra@fastmail.us>
Date:   Mon, 10 Sep 2018 09:00:05 -0400

Check for unknown current working directory

Diffstat:
Mplugin/NERD_tree.vim | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim
@@ -203,6 +203,11 @@ endfunction
 
 function! NERDTreeCWD()
 
+    if empty(getcwd())
+        call nerdtree#echoWarning('current directory does not exist')
+        return
+    endif
+
     try
         let l:cwdPath = g:NERDTreePath.New(getcwd())
     catch /^NERDTree.InvalidArgumentsError/