mirror of
https://github.com/preservim/tagbar.git
synced 2024-11-22 15:46:27 +08:00
use g:tagbar_highlight_method as default in tagbar#currenttag and forward search method from :TagbarCurrentTag (#803)
* allow to specify {search-method} in :TagbarCurrentTag command * tagbar#currenttag now uses g:tagbar_highlight_method as default search method
This commit is contained in:
parent
0441c1c6d9
commit
3188ab1ee8
|
@ -3901,13 +3901,13 @@ function! tagbar#currenttag(fmt, default, ...) abort
|
|||
if a:0 >= 2
|
||||
let search_method = a:2
|
||||
else
|
||||
let search_method = 'nearest-stl'
|
||||
let search_method = g:tagbar_highlight_method
|
||||
endif
|
||||
else
|
||||
let longsig = 0
|
||||
let fullpath = 0
|
||||
let prototype = 0
|
||||
let search_method = 'nearest-stl'
|
||||
let search_method = g:tagbar_highlight_method
|
||||
endif
|
||||
|
||||
if !s:Init(1)
|
||||
|
|
|
@ -295,9 +295,9 @@ COMMANDS *tagbar-commands*
|
|||
Open the parent folds of the current tag in the file window as much as
|
||||
needed for the tag to be visible in the Tagbar window.
|
||||
|
||||
:TagbarCurrentTag [{flags}] *:TagbarCurrentTag*
|
||||
Echo the current tag in the command line. For {flags} see
|
||||
|tagbar-statusline|.
|
||||
:TagbarCurrentTag [{flags} [{search-method}]] *:TagbarCurrentTag*
|
||||
Echo the current tag in the command line. For {flags} and {search-method}
|
||||
see |tagbar-statusline|.
|
||||
|
||||
:TagbarGetTypeConfig {filetype} *:TagbarGetTypeConfig*
|
||||
Paste the Tagbar configuration of the vim filetype {filetype} at the
|
||||
|
|
|
@ -190,7 +190,7 @@ command! -nargs=0 TagbarOpenAutoClose call tagbar#OpenWindow('fcj')
|
|||
command! -nargs=0 TagbarClose call tagbar#CloseWindow()
|
||||
command! -nargs=1 -bang TagbarSetFoldlevel call tagbar#SetFoldLevel(<args>, <bang>0)
|
||||
command! -nargs=0 TagbarShowTag call tagbar#highlighttag(1, 1)
|
||||
command! -nargs=? TagbarCurrentTag echo tagbar#currenttag('%s', 'No current tag', <f-args>)
|
||||
command! -nargs=* TagbarCurrentTag echo tagbar#currenttag('%s', 'No current tag', <f-args>)
|
||||
command! -nargs=1 TagbarGetTypeConfig call tagbar#gettypeconfig(<f-args>)
|
||||
command! -nargs=? TagbarDebug call tagbar#debug#start_debug(<f-args>)
|
||||
command! -nargs=0 TagbarDebugEnd call tagbar#debug#stop_debug()
|
||||
|
|
Loading…
Reference in New Issue
Block a user