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:
Christian Brabandt
2019-04-26 10:16:40 +02:00
parent fdd75df927
commit a753422549
5 changed files with 13 additions and 8 deletions

View File

@@ -257,8 +257,9 @@ COMMANDS *airline-commands*
:AirlineToggle *:AirlineToggle*
Toggles between the standard 'statusline' and airline.
:AirlineRefresh *:AirlineRefresh*
Refreshes all highlight groups and redraws the statusline.
:AirlineRefresh[!] *:AirlineRefresh*
Refreshes all highlight groups and redraws the statusline. With the '!'
attribute, skips refreshing the highlighting groups.
:AirlineExtensions *:AirlineExtensions*
Shows the status of all available airline extensions.