Problem with highlighting groups per tabpages
The current mode is only cached per window. This will break, if one switches tabpage. We remember the last mode that was used to create the highlighting group and compare, if this has changed. This fixes #670
This commit is contained in:
parent
cb30971901
commit
ac86003ac3
|
@ -179,10 +179,12 @@ function! airline#check_mode(winnr)
|
|||
endif
|
||||
|
||||
let mode_string = join(l:mode)
|
||||
if get(w:, 'airline_lastmode', '') != mode_string
|
||||
if get(w:, 'airline_lastmode', '') != mode_string ||
|
||||
\ get(s:, 'airline_lastmode', []) != l:mode
|
||||
call airline#highlighter#highlight_modified_inactive(context.bufnr)
|
||||
call airline#highlighter#highlight(l:mode)
|
||||
let w:airline_lastmode = mode_string
|
||||
let s:airline_lastmode = l:mode
|
||||
endif
|
||||
|
||||
return ''
|
||||
|
|
Loading…
Reference in New Issue