Several extensions trigger custom actions. Make sure, those actions are
only performed, if airline is actually active and not temporarily
disabled using e.g. :AirlineToggle
currently, empty buffer names were still considered to match against the
exclude_path setting. That does not make sense, so skip the check for
empty bufnames.
airline#extensions#tabline#excludes and
airline#extensions#tabline#exclude_preview previously had no impact if
changed after vim load. This fixes that.
This should make the buflist algorithm faster.
Also there is an alternative implementation in branch 535 available,
which avoids looping over the complete range, I'll stay with the current
approach, as it does not depend on BufAdd/BufDelete autocommands.
details:
instead of testing for buflisted() and bufexists() we only test for
buflisted() because, this also tests for the existence of the buffer.
Also instead of a second loop of the exclude patterns, we'll join all
of them together with '\|' and check if they match the current buffer.
The rest of the conditions have been joined into a single condition.
This together made up an improvement of
Orig:
FUNCTION airline#extensions#tabline#buflist#list()
Called 94 times
Total time: 0.267305
Self time: 0.267305
New:
FUNCTION airline#extensions#tabline#buflist#list()
Called 85 times
Total time: 0.124572
Self time: 0.124572