From 2391ed05795a9d41bf12cc0ebe2285cba02e7a56 Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Thu, 5 Sep 2013 22:34:15 +0000 Subject: [PATCH] show hidden buffers with a different color. resolves #229. --- autoload/airline/extensions/tabline.vim | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/autoload/airline/extensions/tabline.vim b/autoload/airline/extensions/tabline.vim index f3e64f0b..7969f6ff 100644 --- a/autoload/airline/extensions/tabline.vim +++ b/autoload/airline/extensions/tabline.vim @@ -46,11 +46,13 @@ function! airline#extensions#tabline#load_theme(palette) let l:tabtype = get(colors, 'airline_tabtype', a:palette.visual.airline_a) let l:tabfill = get(colors, 'airline_tabfill', a:palette.normal.airline_c) let l:tabmod = get(colors, 'airline_tabmod', a:palette.insert.airline_a) + let l:tabhid = get(colors, 'airline_tabhid', a:palette.normal.airline_c) call airline#highlighter#exec('airline_tab', l:tab) call airline#highlighter#exec('airline_tabsel', l:tabsel) call airline#highlighter#exec('airline_tabtype', l:tabtype) call airline#highlighter#exec('airline_tabfill', l:tabfill) call airline#highlighter#exec('airline_tabmod', l:tabmod) + call airline#highlighter#exec('airline_tabhid', l:tabhid) endfunction function! s:cursormove() @@ -130,6 +132,7 @@ endfunction function! s:get_buffers() let b = airline#builder#new(s:builder_context) let cur = bufnr('%') + let tab_bufs = tabpagebuflist(tabpagenr()) for nr in s:get_buffer_list() if cur == nr if g:airline_detect_modified && getbufvar(nr, '&modified') @@ -138,7 +141,11 @@ function! s:get_buffers() let group = 'airline_tabsel' endif else - let group = 'airline_tab' + if index(tab_bufs, nr) > -1 + let group = 'airline_tab' + else + let group = 'airline_tabhid' + endif endif call b.add_section(group, '%( %{airline#extensions#tabline#get_buffer_name('.nr.')} %)') endfor