mirror of
https://github.com/gryf/tagbar.git
synced 2026-10-08 23:02:32 +02:00
Update line info when jumping to a tag, closes #26
This commit is contained in:
1 parent
3b389aed00
commit
3c075654d4
1 file changed
+8
@@ -2341,6 +2341,14 @@ function! s:JumpToTag(stay_in_tagbar)
|
||||
endwhile
|
||||
endif
|
||||
|
||||
" If the tag is on a different line after unsaved changes update the tag
|
||||
" and file infos/objects
|
||||
let curline = line('.')
|
||||
if taginfo.fields.line != curline
|
||||
let taginfo.fields.line = curline
|
||||
let taginfo.fileinfo.fline[curline] = taginfo
|
||||
endif
|
||||
|
||||
" Center the tag in the window
|
||||
normal! z.
|
||||
|
||||
|
||||
Reference in new issue
Block a user