Merge pull request #396 from gstewart/master
Fixed modified tab/buffer not updating in tabline
This commit is contained in:
commit
7a1801e9c4
@ -183,11 +183,14 @@ endfunction
|
||||
let s:current_bufnr = -1
|
||||
let s:current_tabnr = -1
|
||||
let s:current_tabline = ''
|
||||
let s:current_modified = 0
|
||||
function! s:get_buffers()
|
||||
let cur = bufnr('%')
|
||||
if cur == s:current_bufnr
|
||||
if !g:airline_detect_modified || getbufvar(cur, '&modified') == s:current_modified
|
||||
return s:current_tabline
|
||||
endif
|
||||
endif
|
||||
|
||||
let b = airline#builder#new(s:builder_context)
|
||||
let tab_bufs = tabpagebuflist(tabpagenr())
|
||||
@ -202,6 +205,7 @@ function! s:get_buffers()
|
||||
else
|
||||
let group = 'airline_tabsel'
|
||||
endif
|
||||
let s:current_modified = (group == 'airline_tabmod') ? 1 : 0
|
||||
else
|
||||
if index(tab_bufs, nr) > -1
|
||||
let group = 'airline_tab'
|
||||
@ -225,8 +229,10 @@ function! s:get_tabs()
|
||||
let curbuf = bufnr('%')
|
||||
let curtab = tabpagenr()
|
||||
if curbuf == s:current_bufnr && curtab == s:current_tabnr
|
||||
if !g:airline_detect_modified || getbufvar(curbuf, '&modified') == s:current_modified
|
||||
return s:current_tabline
|
||||
endif
|
||||
endif
|
||||
|
||||
let b = airline#builder#new(s:builder_context)
|
||||
for i in range(1, tabpagenr('$'))
|
||||
@ -239,6 +245,7 @@ function! s:get_tabs()
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
let s:current_modified = (group == 'airline_tabmod') ? 1 : 0
|
||||
else
|
||||
let group = 'airline_tab'
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user