Fix the scrolloff local setting in RenderKeepView (#697)

This commit is contained in:
raven42 2020-10-30 15:56:36 -05:00 committed by GitHub
parent 30b20fc87d
commit 99c22f1bb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2123,13 +2123,13 @@ function! s:RenderKeepView(...) abort
call s:RenderContent()
let scrolloff_save = &scrolloff
set scrolloff=0
setlocal scrolloff=0
call cursor(topline, 1)
normal! zt
call cursor(line, curcol)
let &scrolloff = scrolloff_save
let &l:scrolloff = scrolloff_save
redraw
endfunction