keymap: allow to disable extension by checking config var

closes #1556
This commit is contained in:
Christian Brabandt 2017-09-03 21:18:01 +02:00
parent 571f892fcd
commit 81f089322a
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

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