Factor out scope string generation.
This commit is contained in:
parent
ae3ac4a471
commit
38e99ef72c
|
@ -2205,12 +2205,7 @@ function! s:Tlist_Parse_Tagline(tag_line,ftype)
|
||||||
" Add the tag scope, if it is available and is configured. Tag
|
" Add the tag scope, if it is available and is configured. Tag
|
||||||
" scope is the last field after the 'line:<num>\t' field
|
" scope is the last field after the 'line:<num>\t' field
|
||||||
if g:Tlist_Display_Tag_Scope
|
if g:Tlist_Display_Tag_Scope
|
||||||
let tag_scopes = s:Tlist_Extract_Tag_Scope(a:tag_line)
|
let ttxt .= s:Tlist_Get_Scope_String(a:tag_line, a:ftype)
|
||||||
for [extradata_name, extradata_content] in items(tag_scopes)
|
|
||||||
if !exists('g:Tlist_{a:ftype}_Show_Extras') || match(g:Tlist_{a:ftype}_Show_Extras, extradata_name) != -1
|
|
||||||
let ttxt = ttxt . ' [' . extradata_content . ']'
|
|
||||||
endif
|
|
||||||
endfor
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -2226,6 +2221,17 @@ function! s:Tlist_Parse_Tagline(tag_line,ftype)
|
||||||
let {fidx_tidx}_tag_name = tag_name
|
let {fidx_tidx}_tag_name = tag_name
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! s:Tlist_Get_Scope_String(tag_line, ftype)
|
||||||
|
let ttxt = ''
|
||||||
|
let tag_scopes = s:Tlist_Extract_Tag_Scope(a:tag_line)
|
||||||
|
for [extradata_name, extradata_content] in items(tag_scopes)
|
||||||
|
if !exists('g:Tlist_{a:ftype}_Show_Extras') || match(g:Tlist_{a:ftype}_Show_Extras, extradata_name) != -1
|
||||||
|
let ttxt = ttxt . ' [' . extradata_content . ']'
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
return ttxt
|
||||||
|
endfunction
|
||||||
|
|
||||||
" Tlist_Process_File
|
" Tlist_Process_File
|
||||||
" Get the list of tags defined in the specified file and store them
|
" Get the list of tags defined in the specified file and store them
|
||||||
" in Vim variables. Returns the file index where the tags are stored.
|
" in Vim variables. Returns the file index where the tags are stored.
|
||||||
|
@ -2431,12 +2437,7 @@ function! s:Tlist_Process_File(filename, ftype)
|
||||||
" Add the tag scope, if it is available and is configured. Tag
|
" Add the tag scope, if it is available and is configured. Tag
|
||||||
" scope is the last field after the 'line:<num>\t' field
|
" scope is the last field after the 'line:<num>\t' field
|
||||||
if g:Tlist_Display_Tag_Scope
|
if g:Tlist_Display_Tag_Scope
|
||||||
let tag_scopes = s:Tlist_Extract_Tag_Scope(a:tag_line)
|
let ttxt .= s:Tlist_Get_Scope_String(a:tag_line, a:ftype)
|
||||||
for [extradata_name, extradata_content] in items(tag_scopes)
|
|
||||||
if !exists('g:Tlist_{a:ftype}_Show_Extras') || match(g:Tlist_{a:ftype}_Show_Extras, extradata_name) != -1
|
|
||||||
let ttxt = ttxt . ' [' . extradata_content . ']'
|
|
||||||
endif
|
|
||||||
endfor
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue