fix a bug with scrolloff

take &scrolloff into account when restoring the window position when
recreating the nerd tree window
This commit is contained in:
Martin Grenfell
2008-06-22 13:54:32 +12:00
parent d15818bafa
commit 5884cf3774

View File

@@ -2356,9 +2356,12 @@ function! s:RestoreScreenState()
endif
exec("silent ". (g:NERDTreeSplitVertical ? "vertical" : "") ." resize ".t:NERDTreeOldWindowSize)
let old_scrolloff=&scrolloff
let &scrolloff=0
call cursor(t:NERDTreeOldTopLine, 0)
normal! zt
call setpos(".", t:NERDTreeOldPos)
let &scrolloff=old_scrolloff
endfunction
"FUNCTION: s:SaveScreenState() {{{2