From d162c08fd7fa618d0f576a02134a54799adbc772 Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Wed, 2 Jul 2014 20:54:14 +0100 Subject: [PATCH] comment and tweak the fix in 24561ad --- lib/nerdtree/key_map.vim | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/nerdtree/key_map.vim b/lib/nerdtree/key_map.vim index e237076..ee099fa 100644 --- a/lib/nerdtree/key_map.vim +++ b/lib/nerdtree/key_map.vim @@ -79,9 +79,16 @@ endfunction "If a keymap has the scope of "all" then it will be called if no other keymap "is found for a:key and the scope. function! s:KeyMap.Invoke(key) - if !exists('b:NERDTreeRoot') + + "required because clicking the command window below another window still + "invokes the mapping - but changes the window cursor + "is in first + " + "TODO: remove this check when the vim bug is fixed + if !nerdtree#treeExistsForBuf() return {} endif + let node = g:NERDTreeFileNode.GetSelected() if !empty(node)