From dd587883eb0e964d4611f5753fbfa99e48cdff2d Mon Sep 17 00:00:00 2001 From: Lingnan Dai Date: Thu, 18 Dec 2014 12:30:38 +0000 Subject: [PATCH] fixed bug with excludes for buffers --- autoload/airline/extensions/tabline.vim | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/autoload/airline/extensions/tabline.vim b/autoload/airline/extensions/tabline.vim index bbab057..91da5a7 100644 --- a/autoload/airline/extensions/tabline.vim +++ b/autoload/airline/extensions/tabline.vim @@ -135,15 +135,19 @@ function! s:get_buffer_list() let cur = bufnr('%') for nr in range(1, bufnr('$')) if buflisted(nr) && bufexists(nr) + let toadd = 1 for ex in s:excludes - if match(bufname(nr), ex) - continue + if match(bufname(nr), ex) >= 0 + let toadd = 0 + break endif endfor if getbufvar(nr, 'current_syntax') == 'qf' - continue + let toadd = 0 + endif + if toadd + call add(buffers, nr) endif - call add(buffers, nr) endif endfor