Check that funcrefs() actually exists

closes #1819
This commit is contained in:
Christian Brabandt 2018-11-07 17:55:11 +01:00
parent b7367c605a
commit ce6cf6f07e
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
1 changed files with 2 additions and 1 deletions

View File

@ -123,9 +123,10 @@ function! s:airline_toggle()
\ | endif
autocmd VimResized * unlet! w:airline_lastmode | :call <sid>airline_refresh()
if s:has_timers
if s:has_timers && (v:version > 704 || (v:version == 704 && has("patch2137")))
" do not trigger FocusGained on startup, it might erase the intro
" screen (see #1817)
" needs funcref() which comes with 7.4.2137
let Handler=funcref('<sid>FocusGainedHandler')
let s:timer=timer_start(5000, Handler)
else