From 0e70dac0304265dab59d8ad94fd4b73373deea5c Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Tue, 23 Feb 2016 20:23:29 +0100 Subject: [PATCH] Disable tabline refresh per configuration fixes #1049 and should prevent that users see AirlineTabRefresh printed on their screen. --- autoload/airline/extensions/tabline.vim | 3 +++ doc/airline.txt | 13 +++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/autoload/airline/extensions/tabline.vim b/autoload/airline/extensions/tabline.vim index 23f52785..2e547f86 100644 --- a/autoload/airline/extensions/tabline.vim +++ b/autoload/airline/extensions/tabline.vim @@ -42,6 +42,9 @@ function! s:toggle_on() endfunction function! s:update_tabline() + if get(g:, 'airline#extensions#tabline#disable_refresh', 0) + return + endif let match = expand('') if pumvisible() return diff --git a/doc/airline.txt b/doc/airline.txt index 16fe8f11..8633a961 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -521,12 +521,12 @@ eclim buffer on the left. Also none of the above tabline switches is currently supported! -* rename label for buffers (default: 'buffers') +* rename label for buffers (default: 'buffers') > let g:airline#extensions#tabline#buffers_label = 'b' -* rename label for tabs (default: 'tabs') +* rename label for tabs (default: 'tabs') > let g:airline#extensions#tabline#tabs_label = 't' - +< When enabled, numbers will be displayed in the tabline and mappings will be exposed to allow you to select a buffer directly. Up to 9 mappings will be exposed. > @@ -571,7 +571,7 @@ eclim * configure whether buffer numbers should be shown. > let g:airline#extensions#tabline#buffer_nr_show = 0 < - * configure how buffer numbers should be formatted with |printf|. > + * configure how buffer numbers should be formatted with |printf()|. > let g:airline#extensions#tabline#buffer_nr_format = '%s: ' < * configure the formatting of filenames (see |filename-modifiers|). > @@ -623,6 +623,11 @@ eclim < Note: Enabling this extension will modify 'showtabline' and 'guioptions'. +* enable Refresh of tabline buffers on |BufAdd| autocommands + (set this to one, if you note 'AirlineTablineRefresh', however, this + won't update airline on |:badd| commands) > + let airline#extensions#tabline#disable_refresh = 0 + ------------------------------------- *airline-tmuxline* tmuxline