Merge pull request #2540 from rionda/master

Show flag when `detect_spelllang` is `'flag'`, do not when it is 0.
This commit is contained in:
Christian Brabandt 2022-06-08 15:02:47 +02:00 committed by GitHub
commit 97a9aa4bdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -146,7 +146,7 @@ function! airline#parts#spell()
let spelllang = g:airline_detect_spelllang ? printf(" [%s]", toupper(substitute(&spelllang, ',', '/', 'g'))) : ''
if g:airline_detect_spell && (&spell || (exists('g:airline_spell_check_command') && eval(g:airline_spell_check_command)))
if g:airline_detect_spelllang && g:airline_detect_spelllang ==? 'flag'
if g:airline_detect_spelllang !=? '0' && g:airline_detect_spelllang ==? 'flag'
let spelllang = tolower(&spelllang)
if has_key(s:flags, spelllang)
return s:flags[spelllang]