From 022c769494f475213dc37bbef1f2ff195e2d387c Mon Sep 17 00:00:00 2001 From: Chris Weyl Date: Wed, 19 Aug 2015 15:13:51 -0700 Subject: [PATCH] Fix vim-capslock functionality after changes in CapsLockStatusline() CapsLockStatusline() used to return '[caps]' when soft-capslock was on... and now returns '[Caps]'. As we're just using this to test for the lock, we lower-case the return value in order to "normalize" the value across versions. The change in behaviour can be seen at: tpope/vim-capslock@3a0f0513730f03ebabc35ab18f6d771f1d979a3f --- autoload/airline/extensions/capslock.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/airline/extensions/capslock.vim b/autoload/airline/extensions/capslock.vim index 689b561..32aaf39 100644 --- a/autoload/airline/extensions/capslock.vim +++ b/autoload/airline/extensions/capslock.vim @@ -5,7 +5,7 @@ if !exists('*CapsLockStatusline') endif function! airline#extensions#capslock#status() - return CapsLockStatusline() == '[caps]' ? 'CAPS' : '' + return tolower(CapsLockStatusline()) == '[caps]' ? 'CAPS' : '' endfunction function! airline#extensions#capslock#init(ext)