diff --git a/autoload/airline/extensions/tabline.vim b/autoload/airline/extensions/tabline.vim index 5f1d7940..1f9b0ff4 100644 --- a/autoload/airline/extensions/tabline.vim +++ b/autoload/airline/extensions/tabline.vim @@ -48,8 +48,6 @@ function! s:update_tabline() return endif let match = expand('') - let ignore_bufadd_pat = get(g:, 'airline#extensions#tabline#ignore_bufadd_pat', - \ '\c\vgundo|undotree|vimfiler|tagbar|nerd_tree|startify') if pumvisible() return elseif !get(g:, 'airline#extensions#tabline#enabled', 0) diff --git a/autoload/airline/extensions/tabline/buflist.vim b/autoload/airline/extensions/tabline/buflist.vim index c07cf867..9ed3cd71 100644 --- a/autoload/airline/extensions/tabline/buflist.vim +++ b/autoload/airline/extensions/tabline/buflist.vim @@ -36,6 +36,7 @@ function! airline#extensions#tabline#buflist#list() let exclude_buffers = get(g:, 'airline#extensions#tabline#exclude_buffers', []) let exclude_paths = get(g:, 'airline#extensions#tabline#excludes', []) let exclude_preview = get(g:, 'airline#extensions#tabline#exclude_preview', 1) + let exclude_types = get(g:, 'g:airline#extensions#tabline#ignore_bufadd_pat', []) let list = (exists('g:did_bufmru') && g:did_bufmru) ? BufMRUList() : range(1, bufnr("$")) @@ -52,14 +53,18 @@ function! airline#extensions#tabline#buflist#list() " 4) when excluding preview windows: " 'bufhidden' == wipe " 'buftype' == nofile + " 5) ignore buffers matching airline#extensions#tabline#ignore_bufadd_pat " check buffer numbers first if index(exclude_buffers, nr) >= 0 continue - " check paths second + " check paths second elseif !empty(exclude_paths) && s:ExcludePaths(nr, exclude_paths) continue - " check other types last + " ignore buffers matching airline#extensions#tabline#ignore_bufadd_pat + elseif airline#util#ignore_buf(bufname(nr)) + continue + " check other types last elseif s:ExcludeOther(nr, exclude_preview) continue endif