mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-06 12:14:24 +08:00
branch: disable FocusGained handler when updating fugitive information
closes #2029
This commit is contained in:
@@ -11,6 +11,7 @@ let s:spc = g:airline_symbols.space
|
||||
let s:nomodeline = (v:version > 703 || (v:version == 703 && has("patch438"))) ? '<nomodeline>' : ''
|
||||
let s:has_strchars = exists('*strchars')
|
||||
let s:has_strcharpart = exists('*strcharpart')
|
||||
let s:focusgained_enabled = 0
|
||||
|
||||
" TODO: Try to cache winwidth(0) function
|
||||
" e.g. store winwidth per window and access that, only update it, if the size
|
||||
@@ -190,3 +191,11 @@ function! airline#util#stl_disabled(winnr)
|
||||
\ airline#util#getwinvar(a:winnr, 'airline_disabled', 0) ||
|
||||
\ airline#util#getbufvar(winbufnr(a:winnr), 'airline_disable_statusline', 0)
|
||||
endfunction
|
||||
|
||||
function! airline#util#focusgain(allow)
|
||||
let s:focusgained_enabled = a:allow
|
||||
endfunction
|
||||
|
||||
function! airline#util#focusgained_disabled()
|
||||
return s:focusgained_enabled < 1
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user