add tab modification detection
This commit is contained in:
parent
a9b2fd2c41
commit
8c32da38c7
@ -139,7 +139,18 @@ endfunction
|
|||||||
function! s:get_tabs()
|
function! s:get_tabs()
|
||||||
let b = airline#builder#new(s:builder_context)
|
let b = airline#builder#new(s:builder_context)
|
||||||
for i in range(1, tabpagenr('$'))
|
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 = '%('
|
let val = '%('
|
||||||
if s:tab_nr_type == 0
|
if s:tab_nr_type == 0
|
||||||
let val .= ' %{len(tabpagebuflist('.i.'))}'
|
let val .= ' %{len(tabpagebuflist('.i.'))}'
|
||||||
|
Loading…
Reference in New Issue
Block a user