commit
020ee382dc
@ -4,7 +4,7 @@
|
|||||||
let s:formatter = get(g:, 'airline#extensions#tabline#formatter', 'default')
|
let s:formatter = get(g:, 'airline#extensions#tabline#formatter', 'default')
|
||||||
let s:show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1)
|
let s:show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1)
|
||||||
let s:show_tabs = get(g:, 'airline#extensions#tabline#show_tabs', 1)
|
let s:show_tabs = get(g:, 'airline#extensions#tabline#show_tabs', 1)
|
||||||
|
let s:ignore_bufadd_pat = get(g:, 'airline#extensions#tabline#ignore_bufadd_pat', '\c\vgundo|undotree|vimfiler|tagbar|nerd_tree')
|
||||||
let s:taboo = get(g:, 'airline#extensions#taboo#enabled', 1) && get(g:, 'loaded_taboo', 0)
|
let s:taboo = get(g:, 'airline#extensions#taboo#enabled', 1) && get(g:, 'loaded_taboo', 0)
|
||||||
if s:taboo
|
if s:taboo
|
||||||
let g:taboo_tabline = 0
|
let g:taboo_tabline = 0
|
||||||
@ -38,10 +38,16 @@ function! s:toggle_on()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:update_tabline()
|
function! s:update_tabline()
|
||||||
|
let match = expand('<afile>')
|
||||||
if pumvisible()
|
if pumvisible()
|
||||||
return
|
return
|
||||||
elseif !get(g:, 'airline#extensions#tabline#enabled', 0)
|
elseif !get(g:, 'airline#extensions#tabline#enabled', 0)
|
||||||
return
|
return
|
||||||
|
" return, if buffer matches ignore pattern or is directory (netrw)
|
||||||
|
elseif empty(match)
|
||||||
|
\ || match(match, s:ignore_bufadd_pat) > -1
|
||||||
|
\ || isdirectory(expand("<afile>"))
|
||||||
|
return
|
||||||
endif
|
endif
|
||||||
" force re-evaluation of tabline setting
|
" force re-evaluation of tabline setting
|
||||||
set mod!
|
set mod!
|
||||||
|
@ -567,6 +567,11 @@ exposed.
|
|||||||
* configure symbol used to represent close button
|
* configure symbol used to represent close button
|
||||||
let g:airline#extensions#tabline#close_symbol = 'X'
|
let g:airline#extensions#tabline#close_symbol = 'X'
|
||||||
|
|
||||||
|
* configure pattern to be ignored on BufAdd autocommand >
|
||||||
|
" fixes unneccessary redraw, when e.g. opening Gundo window
|
||||||
|
let airline#extensions#tabline#ignore_bufadd_pat =
|
||||||
|
\ '\c\vgundo|undotree|vimfiler|tagbar|nerd_tree'
|
||||||
|
|
||||||
<
|
<
|
||||||
Note: Enabling this extension will modify 'showtabline' and 'guioptions'.
|
Note: Enabling this extension will modify 'showtabline' and 'guioptions'.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user