From 71ebe27a8d8b8275acf10fc42ae48706a2a6d38c Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Sat, 18 Jul 2009 00:46:43 +1200 Subject: [PATCH] fix a bug with secondary nerd trees and NERDTreeQuitOnOpen --- doc/NERD_tree.txt | 5 +++++ plugin/NERD_tree.vim | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/NERD_tree.txt b/doc/NERD_tree.txt index 85737c0..0a425c2 100644 --- a/doc/NERD_tree.txt +++ b/doc/NERD_tree.txt @@ -997,6 +997,10 @@ The latest dev versions are on github ============================================================================== 6. Changelog *NERDTreeChangelog* +Next release: + - fix a bug where secondary nerd trees (netrw hijacked trees) and + NERDTreeQuitOnOpen didnt play nicely, thanks to Curtis Harvey. + 3.1.1 - fix a bug where a non-listed no-name buffer was getting created every time the tree windows was created, thanks to Derek Wyatt and owen1 @@ -1087,6 +1091,7 @@ just downloaded pr0n instead. Frederic Chanal (nach) Alf Mikula Lucas S. Buchala + Curtis Harvey ============================================================================== 8. License *NERDTreeLicense* diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index ea5ff80..0286967 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -2344,7 +2344,7 @@ endfunction "FUNCTION: s:closeTreeIfQuitOnOpen() {{{2 "Closes the NERD tree window if the close on open option is set function! s:closeTreeIfQuitOnOpen() - if g:NERDTreeQuitOnOpen + if g:NERDTreeQuitOnOpen && s:isTreeOpen() call s:closeTree() endif endfunction