nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit 00ab690758b0e2935019a94c89f714920954926a
parent d4b4d694698b04e2a69716d28e21872f22d6f5fb
Author: Martin Grenfell <martin_grenfell@msn.com>
Date:   Tue, 28 Oct 2008 21:03:39 +1300

bugfix for doing :qa when a nerd tree is open in another tab

Diffstat:
Mplugin/NERD_tree.vim | 13++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim
@@ -2603,11 +2603,14 @@ endfunction
 "scroll position
 function! s:saveScreenState()
     let win = winnr()
-    call s:putCursorInTreeWin()
-    let t:NERDTreeOldPos = getpos(".")
-    let t:NERDTreeOldTopLine = line("w0")
-    let t:NERDTreeOldWindowSize = s:shouldSplitVertically() ? winwidth("") : winheight("")
-    exec win . "wincmd w"
+    try
+        call s:putCursorInTreeWin()
+        let t:NERDTreeOldPos = getpos(".")
+        let t:NERDTreeOldTopLine = line("w0")
+        let t:NERDTreeOldWindowSize = s:shouldSplitVertically() ? winwidth("") : winheight("")
+        exec win . "wincmd w"
+    catch /NERDTree.view.InvalidOperation/
+    endtry
 endfunction
 
 "FUNCTION: s:setupSyntaxHighlighting() {{{2