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
A buffer name wich special characters such as Command-T [Files] will
cause E94 when trying to call setbufvar() on it. That is because the
'[]' is special in buffer names. Therefore, fnameescape the buffer name.
This should prevent 'E94: No matching buffer for
/home/louis/git/minivimrc/Command-T [Files]' errors.
closes#1906
as requested by the exception thrown:
fugitive: A third-party plugin or vimrc is calling
fugitive#buffer().commit() which has been removed. Replace it with
matchstr(FugitiveParse()[0], '^\x\+')
if the same highlighting group is used on the left and right for the
label, the `airline_tablabel_to_airline_tabmod` will be overwritten on
the right side, causing the fg/bg colors to be wrong, because on the
right side they have to be the opposite of the left side.
So use a separate highlighting group for the tablabel on the right.
closes#1902
plugin/airline.vim was calling airline#switch_theme() without actually
catching the 'not-found' exception.
Therefore, in case of errors, explicitly switch to a dark theme.
closes#1903
You can now specify the special theme name `random` and vim-airline will
load a random theme from the ones installed. This works from either your
.vimrc as well as when calling `:AirlineTheme` command directly.
closesvim-airline/vim-airline-themes#170
The 'autochdir' option could be toggled on later in a session.
So do not set the has_autochdir flag once the file is read, but evaluate
it every time the corresponding function is called.
While at it, get rid of the s:fmod variable. Instead let a helper
function return the correct modifier flags depending on the value of the
'autochdir' option.
The magic flags were in the wrong order, %e is the number of errors, it
should go in the parentheses after the # symbol. %fe is the line number
of the first error. Same for the warnings.
This allows for advanced customization where the shortening of the
branch name is up to the caller, unlike before.
This change is observable from the outside, and as such can be
dangerous. But AFAIK it does not change the default behavior.
This removes the hardcoded minwidth limits for both the `hunks` and
`branch` parts. It replaces these with safe accesses to the `minwidth`
setting as done by `airline#parts#define_minwidth`.
Partly revert commit 105e9daaf7
and fix#1857 another way, by making sure, that buffers are not taking
away from the s:current_visible_buffers list.
Fixes#1857Fixes#1872