From 57cda93aad9cc3cfe4b0d7d31d0492c1308c285a Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Sat, 26 Aug 2017 18:14:08 +0200 Subject: [PATCH] keymap: fix the style --- autoload/airline/extensions/keymap.vim | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/autoload/airline/extensions/keymap.vim b/autoload/airline/extensions/keymap.vim index f14e037..0348fd1 100644 --- a/autoload/airline/extensions/keymap.vim +++ b/autoload/airline/extensions/keymap.vim @@ -1,18 +1,14 @@ -" MIT License. Copyright (c) 2017 Doron Behar. +" MIT License. Copyright (c) 2013-2017 Doron Behar, C.Brabandt +" vim: et ts=2 sts=2 sw=2 scriptencoding utf-8 if !has('keymap') - finish + finish endif function! airline#extensions#keymap#status() - if &keymap != '' - let s:keymap2print = g:airline_symbols.keymap . ' ' . &keymap - else - let s:keymap2print = '' - endif - return printf('%s', s:keymap2print) + return ('%s', (&keymap ? (g:airline_symbols.keymap . ' '. &keymap) : '')) endfunction function! airline#extensions#keymap#init(ext)