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:
@@ -1079,6 +1079,16 @@ Examples:
|
||||
" Set the tag jump location to appear 25% from the top
|
||||
let g:tagbar_jump_offset = winheight(0) / 4
|
||||
<
|
||||
*g:tagbar_jump_lazy_scroll*
|
||||
g:tagbar_jump_lazy_scroll~
|
||||
Default: 0
|
||||
|
||||
If set to non-zero, a jump to a tag will only scroll the window if the
|
||||
tag is not already visible in the window. In other words, when jumping to
|
||||
a tag that is already visible, the cursor will simply be placed on the line
|
||||
containing the tag without scrolling the window. If the tag is not visible
|
||||
in the window then the window will be scrolled and the tag (and cursor)
|
||||
placed in the location dictated by |g:tagbar_jump_offset|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
HIGHLIGHT COLOURS *tagbar-highlight*
|
||||
|
||||
Reference in New Issue
Block a user