mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-07 20:54:26 +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:
@@ -251,6 +251,7 @@ function! airline#extensions#load()
|
|||||||
endif
|
endif
|
||||||
if get(g:, 'airline#extensions#taglist#enabled', 1)
|
if get(g:, 'airline#extensions#taglist#enabled', 1)
|
||||||
\ && exists(':TlistShowTag')
|
\ && exists(':TlistShowTag')
|
||||||
|
\ && exists('*taglist#Tlist_Get_Tagname_By_Line')
|
||||||
call airline#extensions#taglist#init(s:ext)
|
call airline#extensions#taglist#init(s:ext)
|
||||||
call add(s:loaded_ext, 'taglist')
|
call add(s:loaded_ext, 'taglist')
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
scriptencoding utf-8
|
scriptencoding utf-8
|
||||||
|
|
||||||
if !exists(':TlistShowTag')
|
if !exists(':TlistShowTag') && !exists('*taglist#Tlist_Get_Tagname_By_Line')
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user