mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-06 12:14:24 +08:00
branch: ignore upcoming FocusGained when updating
closes #2029 airline#util#focusgain(1) was called too soon -- it's called before vim loses focus and not after it gains focus. Instead, we ignore the next FocusGained event.
This commit is contained in:
@@ -83,10 +83,9 @@ function! s:on_window_changed(event)
|
||||
endfunction
|
||||
|
||||
function! s:on_focus_gained()
|
||||
if airline#util#focusgained_disabled()
|
||||
return
|
||||
if airline#util#try_focusgained()
|
||||
unlet! w:airline_lastmode | :call <sid>airline_refresh(1)
|
||||
endif
|
||||
unlet! w:airline_lastmode | :call <sid>airline_refresh(1)
|
||||
endfunction
|
||||
|
||||
function! s:on_cursor_moved()
|
||||
|
||||
Reference in New Issue
Block a user