1
0
mirror of https://github.com/gryf/tagbar.git synced 2025-12-17 11:30:28 +01:00

Add g:tagbar_jump_lazy_scroll option. (#705)

* Add g:tagbar_jump_lazy_scroll option.

When this option is on, a jump to a tag will only cause the
window to scroll if the tag line is not already visible on
the window.  If it is visible, the cursor will simply move
to that line without scrolling the window.  If the tagline
is not visible then the window will be scrolled as in current
behavior (according to the g:tagbar_jump_offset option).

Fixes #703

* Factor our new logic into a function.

* Add jump target line to doc.
This commit is contained in:
David P. Sicilia
2020-11-10 17:07:57 -05:00
committed by GitHub
parent 10a4a9bc38
commit 6eadc15054
3 changed files with 46 additions and 15 deletions

View File

@@ -97,6 +97,7 @@ function! s:setup_options() abort
\ ['height', 10],
\ ['indent', 2],
\ ['jump_offset', 0],
\ ['jump_lazy_scroll', 0],
\ ['left', 0],
\ ['help_visibility', 0],
\ ['position', default_pos],