Fix#2062: restore g:airline_focuslost_inactive behaviour.
Only ignore focusgained events on Windows. If there are more problematic
platforms, we'll add them later.
Instead of ignoring the next x FocusGained events whenever we do call
system(), ignore them for the current second. That allows us to put a
hard limit on the duration of the ignore.
This seems like a much better solution than the previous one because it
also prevents ignore events from building up (s:focusgained_ignored was
often greater than 5).
Test (gvim 8.2.140 on Win10)
gvim.exe ~/.vim/bundle/airline/autoload/airline/extensions/branch.vim
:Gedit HEAD
check several parents and no regression of looping behaviour from #2053.
:let g:airline_focuslost_inactive = 1
:split
alt-tab several times and statusline is correctly dimmed and restored
each time.
closes#2029
airline#util#focusgain(1) was called too soon -- it's called before vim
loses focus and not after it gains focus. Instead, we ignore the next
FocusGained event.
This is actually a work around for a broken installation. the dict p
should always contain the accents key (see `airline#themes#patch()`
function, that adds missing accents). So even if the theme does not
define the accents key, it should always exist.
However, an error while evaluating the statusline is extremely annoying,
so add some safeguards here and skip the following for loop.
related #2043
vim-airline by default already tries to load theme names, that have the
same name as the colorscheme. Therefore, it does not make sense, to add
mappings that result in the same theme name.
So drop the base16, wombat, zenburn and solarized keys
gina.vim needs the `<mods>` feature to work correctly. Therefore check
that Vim has at least patch 7.4.1898 included before using and accessing
the gina plugin.
fixes#1984
Previously it used a width of >= 80 to display the long word count
format. However I personally found that a bit too wide, while other
sections will be shortened too much which does not really look nice.
Therefore, adjust the limit a bit, using the short word count format for
windows up to 85 characters.