From 58410396797054c4bceacaf7142aef7aab545496 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Fri, 12 Nov 2021 09:28:26 +0100 Subject: [PATCH] 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 --- autoload/airline/extensions.vim | 1 + autoload/airline/extensions/taglist.vim | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/airline/extensions.vim b/autoload/airline/extensions.vim index 2d381277..7489c761 100644 --- a/autoload/airline/extensions.vim +++ b/autoload/airline/extensions.vim @@ -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 diff --git a/autoload/airline/extensions/taglist.vim b/autoload/airline/extensions/taglist.vim index 021a2210..430662a9 100644 --- a/autoload/airline/extensions/taglist.vim +++ b/autoload/airline/extensions/taglist.vim @@ -4,7 +4,7 @@ scriptencoding utf-8 -if !exists(':TlistShowTag') +if !exists(':TlistShowTag') && !exists('*taglist#Tlist_Get_Tagname_By_Line') finish endif