mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-23 02:29:23 +08:00
Merge pull request #1133 from blueyed/on_window_changed-only-once
Update each window only once in s:on_window_changed.
This commit is contained in:
commit
1e77e6cbcc
|
@ -37,6 +37,13 @@ function! s:on_window_changed()
|
||||||
if pumvisible() && (!&previewwindow || g:airline_exclude_preview)
|
if pumvisible() && (!&previewwindow || g:airline_exclude_preview)
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
" Handle each window only once, since we might come here several times for
|
||||||
|
" different autocommands.
|
||||||
|
let l:key = [bufnr('%'), winnr(), winnr('$')]
|
||||||
|
if get(t:, 'airline_last_window_changed', []) == l:key
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
let t:airline_last_window_changed = l:key
|
||||||
call s:init()
|
call s:init()
|
||||||
call airline#update_statusline()
|
call airline#update_statusline()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
Loading…
Reference in New Issue
Block a user