From aa1e7d642f6309576b8d283b5de43b0b0a44483d Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Thu, 16 Feb 2012 16:31:50 +0000 Subject: [PATCH] fix previewing of directory nodes Previously if we used the gi/gs mappings on a dir node/bookmark the cursor would end up in the new window. Now it stays in the current window as expected --- plugin/NERD_tree.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index 78885c0..b21804c 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -2074,6 +2074,10 @@ function! s:Opener._openDirectory(node) call s:initNerdTreeInPlace(a:node.path.str()) endif endif + + if self._stay + call self._restoreCursorPos() + endif endfunction "FUNCTION: Opener._previousWindow() {{{3