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

Fix issue with jumping to a tag with special characters (#649)

In C++, the name of the destructor of a class starts with a
tidle(~) which is special when the option 'magic' is set. This
will cause an error when jumping to a destructor. Call search()
in "very nomagic" environment can solve this problem no matter the
option 'magic' is set or not.
This commit is contained in:
bravestarr
2020-08-29 22:59:53 +08:00
committed by GitHub
parent 40413d8760
commit e5c864738d

View File

@@ -2250,7 +2250,7 @@ function! s:JumpToTag(stay_in_tagbar) abort
call cursor(taginfo.fields.line, taginfo.fields.column)
else
call cursor(taginfo.fields.line, 1)
call search(taginfo.name, 'c', line('.'))
call search('\V' . taginfo.name, 'c', line('.'))
endif
normal! zv