keymap: fix missing keymap symbol, fix wrong condition

This commit is contained in:
Christian Brabandt 2017-08-27 21:29:40 +02:00
parent 97f3f84881
commit 195f2e1dae
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 printf('%s', (&keymap ? (g:airline_symbols.keymap . ' '. &keymap) : ''))
return printf('%s', (!empty(&keymap) ? (g:airline_symbols.keymap . ' '. &keymap) : ''))
endfunction
function! airline#extensions#keymap#init(ext)

View File

@ -69,7 +69,8 @@ function! airline#init#bootstrap()
\ 'paste': 'PASTE',
\ 'spell': 'SPELL',
\ 'modified': '+',
\ 'space': ' '
\ 'space': ' ',
\ 'keymap': 'Keymap:'
\ }, 'keep')
if get(g:, 'airline_powerline_fonts', 0)