1
0
mirror of https://github.com/gryf/tagbar.git synced 2025-12-17 19:40:27 +01:00

Fix the problem that the data type was unexpectedly displayed in the C++ destructor's tag. (#734)

* Fix the problem that the data type was unexpectedly displayed in the C++ destructor's tag.

* Update autoload/tagbar/prototypes/normaltag.vim

Co-authored-by: Caleb Maclennan <caleb@alerque.com>
This commit is contained in:
沈育霖
2021-01-07 21:31:45 +08:00
committed by GitHub
parent 4c1a1a1bc6
commit 978e1fe761

View File

@@ -152,8 +152,11 @@ function! s:getDataType() abort dict
endif
let line = getbufline(bufnr, self.fields.line)[0]
let tmp_name = substitute(self.name, "\\~", '', 'g')
let data_type = substitute(line, '\s*' . tmp_name . '.*', '', '')
if (self.name =~# '^\s*\~')
let data_type = ''
else
let data_type = substitute(line, '\s*' . self.name . '.*', '', '')
endif
" Strip off the path if we have one along with any spaces prior to the
" path