If I do that:
$ cat > test.vim <<EOF
set spellfile=/tmp/en.utf8.add spelllang=en_us spell t_Co=256
hi clear
hi SpellBad guisp=red gui=undercurl guifg=NONE guibg=NONE
ctermfg=NONE ctermbg=NONE term=undercurl cterm=undercurl
hi SpellCap guisp=orange gui=undercurl guifg=NONE guibg=NONE
ctermfg=NONE ctermbg=NONE term=undercurl cterm=undercurl
hi SpellRare guisp=blue gui=undercurl guifg=NONE guibg=NONE
ctermfg=NONE ctermbg=NONE term=undercurl cterm=undercurl
hi SpellLocal guisp=green gui=undercurl guifg=NONE guibg=NONE
ctermfg=NONE ctermbg=NONE term=undercurl cterm=undercurl
spellrare emacs
call setline(1, 'is your favourite edditor vim or emacs?')
EOF
$ vim -f -g --clean -S test.vim # Gives the expected undercurl in
gvim-gtk3 (good)
$ vim --clean -S test.vim # No undercurl and no underline in terminal (bug!)
I expected that vim should fallback to underline in the terminal
since the doc says:
=== BEGIN QUOTE :help undercurl ===
"undercurl" is a curly underline. When "undercurl" is not possible
then "underline" is used. In general "undercurl" and "strikethrough"
is only available in the GUI.
=== END QUOTE ===
A workaround is to use term=underline cterm=underline
instead of term=undercurl cterm=undercurl as in this example:
$ cat > test.vim <<EOF
set spellfile=/tmp/en.utf8.add spelllang=en_us spell t_Co=256
hi clear
hi SpellBad guisp=red gui=undercurl guifg=NONE guibg=NONE
ctermfg=NONE ctermbg=NONE term=underline cterm=underline
hi SpellCap guisp=orange gui=undercurl guifg=NONE guibg=NONE
ctermfg=NONE ctermbg=NONE term=underline cterm=underline
hi SpellRare guisp=blue gui=undercurl guifg=NONE guibg=NONE
ctermfg=NONE ctermbg=NONE term=underline cterm=underline
hi SpellLocal guisp=green gui=undercurl guifg=NONE guibg=NONE
ctermfg=NONE ctermbg=NONE term=underline cterm=underline
spellrare emacs
call setline(1, 'is your favourite edditor vim or emacs?')
EOF
Then it works as expected:
$ vim --clean -S test.vim # underline in terminal (good)
But still, I think that term=undercurl cterm=undercurl should
have a fall-back on underline automatically.
Regards
Dominique