fixes color change regression. resolves #218.
This commit is contained in:
parent
15322a26ed
commit
c144543d03
@ -96,6 +96,10 @@ function! s:invoke_funcrefs(context, funcrefs)
|
||||
endfunction
|
||||
|
||||
function! airline#statusline(winnr)
|
||||
return '%{airline#check_mode()}'.s:contexts[a:winnr].line
|
||||
endfunction
|
||||
|
||||
function! airline#check_mode()
|
||||
if get(w:, 'airline_active', 1)
|
||||
let l:m = mode()
|
||||
if l:m ==# "i"
|
||||
@ -126,6 +130,6 @@ function! airline#statusline(winnr)
|
||||
let w:airline_lastmode = mode_string
|
||||
endif
|
||||
|
||||
return s:contexts[a:winnr].line
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
|
@ -79,5 +79,9 @@ describe 'airline'
|
||||
Expect getwinvar(2, '&statusline') != 'airline#parts#mode'
|
||||
wincmd c
|
||||
end
|
||||
|
||||
it 'should include check_mode'
|
||||
Expect airline#statusline(1) =~ 'airline#check_mode'
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user