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
|
endfunction
|
||||||
|
|
||||||
function! airline#statusline(winnr)
|
function! airline#statusline(winnr)
|
||||||
|
return '%{airline#check_mode()}'.s:contexts[a:winnr].line
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! airline#check_mode()
|
||||||
if get(w:, 'airline_active', 1)
|
if get(w:, 'airline_active', 1)
|
||||||
let l:m = mode()
|
let l:m = mode()
|
||||||
if l:m ==# "i"
|
if l:m ==# "i"
|
||||||
@ -126,6 +130,6 @@ function! airline#statusline(winnr)
|
|||||||
let w:airline_lastmode = mode_string
|
let w:airline_lastmode = mode_string
|
||||||
endif
|
endif
|
||||||
|
|
||||||
return s:contexts[a:winnr].line
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -79,5 +79,9 @@ describe 'airline'
|
|||||||
Expect getwinvar(2, '&statusline') != 'airline#parts#mode'
|
Expect getwinvar(2, '&statusline') != 'airline#parts#mode'
|
||||||
wincmd c
|
wincmd c
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'should include check_mode'
|
||||||
|
Expect airline#statusline(1) =~ 'airline#check_mode'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user