We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88aaba2 commit 3785988Copy full SHA for 3785988
plugin/NERD_tree.vim
@@ -2820,9 +2820,17 @@ function! s:closeTree()
2820
endif
2821
2822
if winnr("$") != 1
2823
+ if winnr() == s:getTreeWinNum()
2824
+ wincmd p
2825
+ let bufnr = bufnr("")
2826
2827
+ else
2828
2829
+ endif
2830
+
2831
call s:exec(s:getTreeWinNum() . " wincmd w")
2832
close
- call s:exec("wincmd p")
2833
+ call s:exec(bufwinnr(bufnr) . " wincmd w")
2834
else
2835
2836
0 commit comments