Redraw buffer tabline when the terminal width changes

This commit is contained in:
mrmr1993 2018-03-15 20:40:36 +00:00
parent 7844d8bf72
commit d13305fc5d

View File

@ -52,7 +52,7 @@ function! airline#extensions#tabline#buffers#get()
" no-op " no-op
endtry endtry
let cur = bufnr('%') let cur = bufnr('%')
if cur == s:current_bufnr if cur == s:current_bufnr && &columns == s:column_width
if !g:airline_detect_modified || getbufvar(cur, '&modified') == s:current_modified if !g:airline_detect_modified || getbufvar(cur, '&modified') == s:current_modified
return s:current_tabline return s:current_tabline
endif endif
@ -140,6 +140,7 @@ function! airline#extensions#tabline#buffers#get()
endif endif
let s:current_bufnr = cur let s:current_bufnr = cur
let s:column_width = &columns
let s:current_tabline = b.build() let s:current_tabline = b.build()
let s:current_visible_buffers = copy(b.buffers) let s:current_visible_buffers = copy(b.buffers)
if b._right_tab <= last_buffer if b._right_tab <= last_buffer