mirror of
https://github.com/gryf/tagbar.git
synced 2025-12-17 11:30:28 +01:00
Highlight correctly if visibility disabled
The highlight pattern for the current tag didn't account for the fact that the visibility symbol is optional. Closes #463
This commit is contained in:
@@ -1941,7 +1941,7 @@ function! s:HighlightTag(openfolds, ...) abort
|
||||
call winline()
|
||||
|
||||
let foldpat = '[' . g:tagbar#icon_open . g:tagbar#icon_closed . ' ]'
|
||||
let pattern = '/^\%' . tagline . 'l\s*' . foldpat . '[-+# ]\zs[^( ]\+\ze/'
|
||||
let pattern = '/^\%' . tagline . 'l\s*' . foldpat . '[-+# ]\?\zs[^( ]\+\ze/'
|
||||
call tagbar#debug#log("Highlight pattern: '" . pattern . "'")
|
||||
if hlexists('TagbarHighlight') " Safeguard in case syntax highlighting is disabled
|
||||
execute 'match TagbarHighlight ' . pattern
|
||||
|
||||
Reference in New Issue
Block a user