diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index 9161141..2a3dd4b 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -2202,7 +2202,7 @@ function! s:HighlightTag(openfolds, ...) abort " If printing the line number of the tag to the left, and the tag is " visible (I.E. parent isn't folded) if g:tagbar_show_tag_linenumbers == 2 && tagline == tag.tline - let pattern = '/^\%' . tagline . 'l\s*' . foldpat . '[-+# ]\[line [0-9]*\] \?\zs[^( ]\+\ze/' + let pattern = '/^\%' . tagline . 'l\s*' . foldpat . '[-+# ]\[[0-9]\+\] \?\zs[^( ]\+\ze/' else let pattern = '/^\%' . tagline . 'l\s*' . foldpat . '[-+# ]\?\zs[^( ]\+\ze/' endif diff --git a/autoload/tagbar/prototypes/normaltag.vim b/autoload/tagbar/prototypes/normaltag.vim index 232e6ab..c3ba1f7 100644 --- a/autoload/tagbar/prototypes/normaltag.vim +++ b/autoload/tagbar/prototypes/normaltag.vim @@ -37,9 +37,9 @@ function! s:strfmt() abort dict let prefix = self._getPrefix() if g:tagbar_show_tag_linenumbers == 1 - let suffix .= ' [line ' . self.fields.line . ']' + let suffix .= ' [' . self.fields.line . ']' elseif g:tagbar_show_tag_linenumbers == 2 - let prefix .= '[line ' . self.fields.line . '] ' + let prefix .= '[' . self.fields.line . '] ' endif return prefix . self.name . suffix diff --git a/autoload/tagbar/prototypes/pseudotag.vim b/autoload/tagbar/prototypes/pseudotag.vim index e4ce87b..740cd84 100644 --- a/autoload/tagbar/prototypes/pseudotag.vim +++ b/autoload/tagbar/prototypes/pseudotag.vim @@ -23,9 +23,9 @@ function! s:strfmt() abort dict let prefix = self._getPrefix() if g:tagbar_show_tag_linenumbers == 1 - let suffix .= ' [line ' . self.fields.line . ']' + let suffix .= ' [' . self.fields.line . ']' elseif g:tagbar_show_tag_linenumbers == 2 - let prefix .= '[line ' . self.fields.line . '] ' + let prefix .= '[' . self.fields.line . '] ' endif return prefix . self.name . '*' . suffix diff --git a/doc/tagbar.txt b/doc/tagbar.txt index aa7ff00..65f66c4 100644 --- a/doc/tagbar.txt +++ b/doc/tagbar.txt @@ -718,10 +718,10 @@ This option allows printing the tag line number next to the tag in the tagbar window. It can be set to the following values: 0 - The line number will not be printed 1 - The line number will be printed to the right of the tag > - Example: function1(int i) [line 42] + Example: function1(int i) [123] < 2 - The line number will be printed to the left of the tag > - Example: [line 42] function1(int i) + Example: [123] function1(int i) < Example: >