vim --clean -S a.vim
a.vim:
set termguicolors hi SpellBad guifg=NONE guibg=NONE guisp=#d20f39 gui=undercurl ctermfg=161 ctermbg=NONE cterm=underline term=underline hi SpellBad
On cmd.exe
default.png (view on web)On msys2
default.png (view on web)9.1.506
MS-Windows Windows Terminal and Consle and Msys consle
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
I have noticed this in Windows on PowerShell 7 and came here to ask if it was specific to Windows/PowerShell.
The problem occurs when guisp is set, but guibg is not. For the SpellBad group, set hi SpellBad guisp=NONE, and the issue cannot be seen.
Minimal config to see:
set termguicolors
colorscheme habamax
set spell
I have this in my vimrc as a bandaid, because yegappan/lsp links the Spell groups for LSP errors / warnings.
def FixSpellHi(): void
if !has('gui_running')
if synIDattr(hlID('SpellBad'), 'bg') == ''
hi SpellBad guisp=NONE
endif
if synIDattr(hlID('SpellCap'), 'bg') == ''
hi SpellCap guisp=NONE
endif
if synIDattr(hlID('SpellRare'), 'bg') == ''
hi SpellRare guisp=NONE
endif
if synIDattr(hlID('SpellLocal'), 'bg') == ''
hi SpellLocal guisp=NONE
endif
endif
enddef
augroup FixSpellingHighlightErrors
autocmd!
autocmd ColorScheme * call FixSpellHi()
augroup END
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
I think I've purchased the right solution to this problem. I won't submit a PR, because I have no way of testing if this works in other terminals.
set termguicolors sets a value, t_8u, to \<Esc>[58;2;%lu;%lu;%lum. Windows Terminal doesn't parse this form (with semicolons) correctly. Windows Terminal wants the colon-form: \<Esc>[58:2::%lu:%lu:%lum. Why this only seems to affect some combinations, I can't say. From what I've read, it's likely the semicolon form causes trouble in other terminals. I never thought about it much until I started using yegappan/lsp.
If and until this is patched, this will work in your vimrc:
vim9script
set termguicolors
&t_8u = "\<Esc>[58:2::%lu:%lu:%lum"
I think
set termguicolors
let &t_8u="\<Esc>[58:2::%lu:%lu:%lum"
Would work in legacy vimscript.
In any case, it's a pretty clean fix, but one more piece of "tribal knowledge" Windows users must possess.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()