commit d21b00c767b6f4c3c5f54982565ef2bb9e846f41
parent 5311777308416ec4932dae0045ef3feac55a75f1
Author: marty <martin_grenfell@msn.com>
Date: Wed, 2 Sep 2009 16:42:24 +1200
fix bug when using x on the tree root
patch from Bryan Venteicher
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim
@@ -3546,7 +3546,7 @@ function! s:closeCurrentDir()
endif
let parent = treenode.parent
- if parent.isRoot()
+ if parent ==# {} || parent.isRoot()
call s:echo("cannot close tree root")
else
call treenode.parent.close()