Merge pull request #2462 from KSR-Yasuda/feature/CustomSpellCheckCommand

Custom Spell Check Command Support
This commit is contained in:
Christian Brabandt 2021-11-12 13:06:26 +01:00 committed by GitHub
commit 4b96f58902
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,7 +66,7 @@ endfunction
function! airline#parts#spell()
let spelllang = g:airline_detect_spelllang ? printf(" [%s]", toupper(substitute(&spelllang, ',', '/', 'g'))) : ''
if g:airline_detect_spell && &spell
if g:airline_detect_spell && (&spell || (exists('g:airline_spell_check_command') && eval(g:airline_spell_check_command)))
let winwidth = airline#util#winwidth()
if winwidth >= 90
return g:airline_symbols.spell . spelllang