mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-25 15:04:44 +02:00
Merge pull request #2471 from capt8bit/taglist_earlier_check
taglist: load taglist variants only once
This commit is contained in:
commit
f678b4c53d
@ -10,15 +10,15 @@ endif
|
|||||||
|
|
||||||
function! airline#extensions#taglist#currenttag()
|
function! airline#extensions#taglist#currenttag()
|
||||||
" Update tag list if taglist is not loaded (else we get an empty tag name)
|
" Update tag list if taglist is not loaded (else we get an empty tag name)
|
||||||
|
" Load yegappan/taglist and vim-scripts/taglist.vim only once.
|
||||||
let tlist_updated = v:false
|
let tlist_updated = v:false
|
||||||
if !exists('*Tlist_Get_Filenames()')
|
if !exists('*taglist#Tlist_Get_Tagname_By_Line()') && !exists('*Tlist_Get_Tagname_By_Line()')
|
||||||
TlistUpdate
|
TlistUpdate
|
||||||
let tlist_updated = v:true
|
let tlist_updated = v:true
|
||||||
endif
|
endif
|
||||||
if !tlist_updated
|
if !tlist_updated && exists('*Tlist_Get_Filenames()')
|
||||||
if stridx(Tlist_Get_Filenames(), expand('%:p')) < 0
|
if stridx(Tlist_Get_Filenames(), expand('%:p')) < 0
|
||||||
TlistUpdate
|
TlistUpdate
|
||||||
let tlist_updated = v:true
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
" Is this function is not present it'means you use the old vertsion of
|
" Is this function is not present it'means you use the old vertsion of
|
||||||
|
Loading…
x
Reference in New Issue
Block a user