fixes color change regression. resolves #218.

This commit is contained in:
Bailey Ling 2013-09-04 15:25:55 +00:00
parent 15322a26ed
commit c144543d03
2 changed files with 9 additions and 1 deletions

View File

@ -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

View File

@ -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