mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-30 01:14:58 +02:00
taglist: check that correct function exists
So 47bf6b1716d599fa19756ce094309a3d551fac73 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
|
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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user