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`.
This is an experimental feature that allows to display the statusline in
the tabline. It might still be a bit rough, but seems to work so far.
Remaining problem:
- Mode changes are not immediately detected, only after moving the
cursor
fixes#1388closes#1867
do not call airline#extensions#branch#head() but instead use the cached
variable b:airline_head.
Note: it looks like GitGutterGetHunkSummary() could need some cacheing
Cache the hunk values. In case of short windows, shorten the hunk string
a little bit and make the branch extension take the hunk value into
account when deciding how much to shorten it.
Prior to this change airline set the function for getting hunks only once,
which works as long as you don't use simlar plugins for different VCS at the
same time.
If that was the case, only one plugin would have won, depending on the first
buffer handled by these plugins. And although the code for the other plugin
was run every time, you would never see the actual line changes, since airline
didn't even bother checking.
Now these plugins can be used side-by-side in the same Vim instance, e.g.
gitgutter for, well, git and signify for the rest.