Skip to content

Commit

Permalink
Fix issue with jumping to a tag with special characters (#649)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bravestarr authored Aug 29, 2020
1 parent 40413d8 commit e5c8647
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/tagbar.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e5c8647

Please sign in to comment.