Fixes issue #2142.
These changes primarily focused on making the include guards more robust
and simplify how the path for w:airline_section_c was generated.
Credits goes to @kazukazuinaina for improving on my original
implementation.
Matched VCS format of Netrw to only show branch name.
Filetype hidden as it is a duplicate on the left side.
File encoding hidden as it does not matter in dirvish buffer.
Removed unnecessary current column information
As requested by the coc maintainer, this is explicitly disabled, unless
the user configures vim-airline to use it for the branch extension. This
is done, because the `CocAction('extensionStats')` function is known to
be slow and this may cause a slow startup.
if g:loaded_youcompleteme does not exists, the ycm extension will not be
loaded. However extensions.vim could still try to init the ycm
extension, which would lead to an error message:
E117: unknown function airline#extensions#ycm#init
so make sure, it is only loaded, if ycm is loaded as well.
Put a word-boundary regex atom before and after the current filetype, to
make sure that a `C` filetype won't be detected as a filetype that
enables the wordcount extension. (`c` matches asciidoc).
Because changes plugin does not rely on git
Also remove the test of the local variable for the changes plugin
whether it is enabled or not, this is taken care of in the changes
plugin
The coc-git extension to coc does show similar statistics as e.g.
gitgutter, therefore, integrate the coc-git interface into the hunk
extension.
closes#2094
[Pandoc flavoured Markdown](https://en.wikipedia.org/wiki/Markdown#CommonMark) has its [own file type in `vim`](https://github.com/vim-pandoc/vim-pandoc-syntax#standalone), namely `markdown.pandoc`.
Word count by default in `vim-airline` obviously would make a lot of sense for this popular file type.
Fix this, by making sure that the wordcount extensions will apply
correctly if any of the combined filetypes (e.g. either pandoc or
markdwon) matches the list of allowed filetypes.
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.