mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-25 09:41:33 +08:00
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:
parent
6e5439126f
commit
5841039679
|
@ -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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
scriptencoding utf-8
|
||||
|
||||
if !exists(':TlistShowTag')
|
||||
if !exists(':TlistShowTag') && !exists('*taglist#Tlist_Get_Tagname_By_Line')
|
||||
finish
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user