From 3b225a132259957a9414845abcbc94d7cd3f410b Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Sat, 26 Aug 2017 21:14:35 +0200 Subject: [PATCH] keymap: add some more missing parts, fix missing printf --- autoload/airline/extensions/keymap.vim | 2 +- autoload/airline/init.vim | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/autoload/airline/extensions/keymap.vim b/autoload/airline/extensions/keymap.vim index 0348fd17..3be79491 100644 --- a/autoload/airline/extensions/keymap.vim +++ b/autoload/airline/extensions/keymap.vim @@ -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) diff --git a/autoload/airline/init.vim b/autoload/airline/init.vim index 1343a70d..01d39987 100644 --- a/autoload/airline/init.vim +++ b/autoload/airline/init.vim @@ -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'])