Skip to content

Commit 71ebe27

Browse files
author
Martin Grenfell
committed
fix a bug with secondary nerd trees and NERDTreeQuitOnOpen
1 parent e7ebee3 commit 71ebe27

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

doc/NERD_tree.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -997,6 +997,10 @@ The latest dev versions are on github
997997
==============================================================================
998998
6. Changelog *NERDTreeChangelog*
999999

1000+
Next release:
1001+
- fix a bug where secondary nerd trees (netrw hijacked trees) and
1002+
NERDTreeQuitOnOpen didnt play nicely, thanks to Curtis Harvey.
1003+
10001004
3.1.1
10011005
- fix a bug where a non-listed no-name buffer was getting created every
10021006
time the tree windows was created, thanks to Derek Wyatt and owen1
@@ -1087,6 +1091,7 @@ just downloaded pr0n instead.
10871091
Frederic Chanal (nach)
10881092
Alf Mikula
10891093
Lucas S. Buchala
1094+
Curtis Harvey
10901095

10911096
==============================================================================
10921097
8. License *NERDTreeLicense*

plugin/NERD_tree.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2344,7 +2344,7 @@ endfunction
23442344
"FUNCTION: s:closeTreeIfQuitOnOpen() {{{2
23452345
"Closes the NERD tree window if the close on open option is set
23462346
function! s:closeTreeIfQuitOnOpen()
2347-
if g:NERDTreeQuitOnOpen
2347+
if g:NERDTreeQuitOnOpen && s:isTreeOpen()
23482348
call s:closeTree()
23492349
endif
23502350
endfunction

0 commit comments

Comments
 (0)