if airline is initialized too early and some :hi commands are run,
this will force a redraw in Vim which will result in the intro screen
being cleared.
Currently, this does not work for gvim, not sure why.
closes#1476 (well only partly, until i have discovered, why for gvim it
doesn't work).
consider a window with these splits:
,----
| file1
| ---
| file2
| ---
| file1
`----
If the top buffer is the active one and you start modifying this buffer,
this will also reset the highlighting for the inactive buffer2, since
the highlighting group 'airline_c_inactive' is used for both windows
(one having the unmodified buffer 'file2' and one having the modified
'file1').
This lead to the incorrect highlighting of the buffer name of file2.
Airline basically already created different airline_c<bufnr>_inactive
highlighting groups, but unfortunately did not use them.
Therefore, make the builder aware of this and always append the buffer
number to the group 'airline_c' if it is in an inactive window.
2) we need to make sure, the highlighting won't get overwritten, so
make the highlighter aware of this situation as well, by appending the
buffer number to the group name, if it creates the 'inactive' mode
groups and a buffer number has been given.
this fixes#1233
theme usually use '_' instead of '-', so replace that first before
trying to match.
Second, make the patterns easier to match.
Third, make sure, match for Tomorrow happens with matching case
fixes#1056
The current mode is only cached per window. This will break, if one
switches tabpage. We remember the last mode that was used to create the
highlighting group and compare, if this has changed.
This fixes#670
While typically both are set (e.g. with `:help`), I am using the
modifiable setting alone to prevent editing of some files via an
autocommand (`*.css`, if `*.scss` exists).
I can also set `readonly` for this buffer, but that gets reset when
reloading the buffer, which is not the case for `modifiable`.