mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-01-09 13:02:19 +08:00
main: Make :AirlineRefresh! skip recrecrating highlighting groups
When `g:skip_empty_sections` is set, `:AirlineRefresh` can be called very often and cause slow down, because it forcefully re-creates the highlighting groups. This is mostly not needed for the redraw to happen, therefore, add the `<bang>` attribute to the command, making it skip to re-create the highlighting groups and have all extensions that rely on a forced update use the `!` form. Should be much fast then. fixes #1908
This commit is contained in:
@@ -165,7 +165,7 @@ function! s:ws_refresh()
|
||||
endif
|
||||
unlet! b:airline_whitespace_check
|
||||
if get(g:, 'airline_skip_empty_sections', 0)
|
||||
exe ':AirlineRefresh'
|
||||
exe ':AirlineRefresh!'
|
||||
endif
|
||||
let b:airline_ws_changedtick = b:changedtick
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user