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

View File

@ -5,7 +5,7 @@ if !exists('*CapsLockStatusline')
endif endif
function! airline#extensions#capslock#status() function! airline#extensions#capslock#status()
return CapsLockStatusline() == '[caps]' ? 'CAPS' : '' return tolower(CapsLockStatusline()) == '[caps]' ? 'CAPS' : ''
endfunction endfunction
function! airline#extensions#capslock#init(ext) function! airline#extensions#capslock#init(ext)