autocommands: check for existence of airline highlight group

Several extensions trigger custom actions. Make sure, those actions are
only performed, if airline is actually active and not temporarily
disabled using e.g. :AirlineToggle
This commit is contained in:
Christian Brabandt
2021-04-30 13:25:26 +02:00
parent 06134df810
commit 2e9df43962
15 changed files with 79 additions and 10 deletions

View File

@@ -230,7 +230,7 @@ function! s:airline_refresh(...)
endfunction
function! s:FocusGainedHandler(timer)
if exists("s:timer") && a:timer == s:timer
if exists("s:timer") && a:timer == s:timer && exists('#airline')
augroup airline
au FocusGained * call s:on_focus_gained()
augroup END