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

This commit is contained in:
Martin Grenfell
2008-10-28 21:03:39 +13:00
parent d4b4d69469
commit 00ab690758

View File

@@ -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