fix screen jumping bug with &scrolloff

This commit is contained in:
Martin Grenfell
2008-05-29 15:27:42 +12:00
parent 90fd47bd00
commit ce9fece626
2 changed files with 6 additions and 0 deletions

View File

@@ -2107,9 +2107,12 @@ function! s:RenderView()
:silent 1,1delete _
"restore the view
let old_scrolloff=&scrolloff
let &scrolloff=0
call cursor(topLine, 1)
normal! zt
call cursor(curLine, curCol)
let &scrolloff = old_scrolloff
setlocal nomodifiable
endfunction