From b2c56e94c9761659e7e1ac84aea6b5934532ee41 Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Sun, 14 Dec 2008 00:38:13 +1300 Subject: [PATCH] fix for the preview mappings --- plugin/NERD_tree.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index 1d30077..3165838 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -3453,12 +3453,13 @@ endfunction "FUNCTION: s:previewNode() {{{2 function! s:previewNode(openNewWin) + let currentBuf = bufnr(".") if a:openNewWin call s:openEntrySplit(1) else call s:activateNode(1) end - call s:putCursorInTreeWin() + exec bufwinnr(currentBuf) . "wincmd w" endfunction " FUNCTION: s:revealBookmark(name) {{{2