Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with tagbar changing the global scrolloff value. #694

Merged
merged 2 commits into from Oct 29, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions autoload/tagbar.vim
Expand Up @@ -1906,13 +1906,13 @@ function! s:RenderContent(...) abort
if !empty(tagbar#state#get_current_file(0)) &&
\ fileinfo.fpath ==# tagbar#state#get_current_file(0).fpath
let scrolloff_save = &scrolloff
set scrolloff=0
setlocal scrolloff=0

call cursor(topline, 1)
normal! zt
call cursor(saveline, savecol)

let &scrolloff = scrolloff_save
execute 'setlocal scrolloff=' . scrolloff_save
raven42 marked this conversation as resolved.
Show resolved Hide resolved
else
" Make sure as much of the Tagbar content as possible is shown in the
" window by jumping to the top after drawing
Expand Down