taglist: check that correct function exists

So 47bf6b1716 added support for
yegappan/taglist plugin, but unfortunately the old (deprecated)
vim-scripts/taglist.vim repo still exists and this one throws an error
when trying to access taglist#Tlist_Get_Tagname_By_Line

So check, that this function is defined before trying to load the
extension
This commit is contained in:
Christian Brabandt 2021-11-12 09:28:26 +01:00
parent 6e5439126f
commit 5841039679
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
2 changed files with 2 additions and 1 deletions

View File

@ -251,6 +251,7 @@ function! airline#extensions#load()
endif
if get(g:, 'airline#extensions#taglist#enabled', 1)
\ && exists(':TlistShowTag')
\ && exists('*taglist#Tlist_Get_Tagname_By_Line')
call airline#extensions#taglist#init(s:ext)
call add(s:loaded_ext, 'taglist')
endif

View File

@ -4,7 +4,7 @@
scriptencoding utf-8
if !exists(':TlistShowTag')
if !exists(':TlistShowTag') && !exists('*taglist#Tlist_Get_Tagname_By_Line')
finish
endif