Merge pull request #224 from seletskiy/tabline-detect-modified

add tab modification detection
This commit is contained in:
Bailey Ling 2013-09-05 07:08:25 -07:00
commit 11f03baf37
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.'))}'