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@3a0f051373
This commit is contained in:
Chris Weyl 2015-08-19 15:13:51 -07:00
parent cdc6d98a09
commit 022c769494
1 changed files with 1 additions and 1 deletions

View File

@ -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)