add tab modification detection

This commit is contained in:
Stanislav Seletskiy 2013-09-05 12:52:29 +07:00
parent a9b2fd2c41
commit 8c32da38c7
1 changed files with 12 additions and 1 deletions

View File

@ -139,7 +139,18 @@ endfunction
function! s:get_tabs()
let b = airline#builder#new(s:builder_context)
for i in range(1, tabpagenr('$'))
let group = i == tabpagenr() ? 'airline_tabsel' : 'airline_tab'
if i == tabpagenr()
let group = 'airline_tabsel'
if g:airline_detect_modified
for bi in tabpagebuflist(i)
if getbufvar(bi, '&modified')
let group = 'airline_tabmod'
endif
endfor
endif
else
let group = 'airline_tab'
endif
let val = '%('
if s:tab_nr_type == 0
let val .= ' %{len(tabpagebuflist('.i.'))}'