keymap: add some more missing parts, fix missing printf

This commit is contained in:
Christian Brabandt 2017-08-26 21:14:35 +02:00
parent f430246aff
commit 3b225a1322
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
2 changed files with 3 additions and 2 deletions

View File

@ -8,7 +8,7 @@ if !has('keymap')
endif
function! airline#extensions#keymap#status()
return ('%s', (&keymap ? (g:airline_symbols.keymap . ' '. &keymap) : ''))
return printf('%s', (&keymap ? (g:airline_symbols.keymap . ' '. &keymap) : ''))
endfunction
function! airline#extensions#keymap#init(ext)

View File

@ -149,6 +149,7 @@ function! airline#init#bootstrap()
\ 'neomake_warning_count', 'ale_error_count', 'ale_warning_count'])
call airline#parts#define_text('capslock', '')
call airline#parts#define_text('xkblayout', '')
call airline#parts#define_text('keymap', '')
unlet g:airline#init#bootstrapping
endfunction
@ -162,7 +163,7 @@ endfunction
function! airline#init#sections()
let spc = g:airline_symbols.space
if !exists('g:airline_section_a')
let g:airline_section_a = airline#section#create_left(['mode', 'crypt', 'paste', 'spell', 'capslock', 'xkblayout', 'iminsert'])
let g:airline_section_a = airline#section#create_left(['mode', 'crypt', 'paste', 'keymap', 'spell', 'capslock', 'xkblayout', 'iminsert'])
endif
if !exists('g:airline_section_b')
let g:airline_section_b = airline#section#create(['hunks', 'branch'])