From 99c22f1bb209e3393053a4dfb38039534b6b8a8d Mon Sep 17 00:00:00 2001 From: raven42 Date: Fri, 30 Oct 2020 15:56:36 -0500 Subject: [PATCH] Fix the scrolloff local setting in RenderKeepView (#697) --- autoload/tagbar.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index 8626011..5fe513e 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -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