't_Cs' (undercurl mode start) is somehow getting set to the xterm cursor color escape sequence, though nothing is assigning it. It is neither in the terminfo entry, nor (as far as I can tell) the built-in termcaps. It is definitely not getting set in a script. (Yes, even with plugins disabled via vim -N -u NONE.) So where does it come from?
The issue causes problems with colorschemes using cterm=undercurl, which are becoming more common since kitty added support for the feature. It can be fixed by overriding the setting (:set t_Cs=), but that should not be necessary.
I was able to reproduce the issue with several xterm-compatible terminals on Debian and Cygwin, using Vim v8.0.1376 and v8.1.429.
TERM=xterm vim -N -u NONE
:set t_Cs?
-> t_Cs=^[]12;%p1%s^G
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
since kitty added support for the feature
For reference: neovim/neovim#7479 (comment)
It supports detection via Su (https://sw.kovidgoyal.net/kitty/protocol-extensions.html).
Isn't this a duplicate of #3471?
I don't get a pink cursor (in mintty), so I thought your issue didn't really apply to me. Your issue is definitely a direct result of this one though.
I just wanted to be more directly to the point.
Ok.
What is infocmp -x for you?
Cs is indeed in terminfo, as an extension. Thanks for the heads up on using -x.
$ TERM=xterm infocmp -1x | grep Cs
Cs=\E]12;%p1%s\007,
See #3471 (comment)
The codes are apparently used for the cursor color.
Cs and Cr are used for set and reset cursor color, respectively. Ce is not used. (#3471 (comment))
Not that it makes any difference.
We could add t_cS and t_cE for those. A bit confusing, but it avoids backwards compatibility problems
Personally, I would prefer Us and Ue, to emphasize "alternate underline".
Shouldn't t_Cs be using the Smulx entry from terminfo? I use alacritty as my terminal emulator:
$ TERM=alacritty infocmp -1 -x | grep Smulx
Smulx=\E[4:%p1%dm,
Doing:
$ echo -e '\e[4:3mThis has an undercurl.'
behaves as expected.
If I do $ vim -u NONE -N and then set t_Cs?, I get what @joshklod reported above, which is what terminfo has set for the Cs capability. But when I examine the output of set termcap?, t_Cs is not listed. (Interestingly, t_Ce is listed and is empty.)
It looks to me like several unwanted things are going on:
t_Cs isn't getting set to the undercurl command reported by terminfo (i.e. the Smulx setting) at all, instead using the cursor colour command Cs. (Confusion because of name similarity?)t_Cs in the output of set termcap?.(As an aside, like in #2424, for me Vim isn't falling back to underline when :hi SpellBad cterm=undercurl is set. Maybe 45a0000 was inadvertently reverted somehow?)
All this misbehaviour goes away if I do :set t_Cs=^[[4:3m -- t_Cs is reported correctly in all contexts, and mis-spelled words have the undercurl applied.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Shouldn't
t_Csbe using theSmulxentry fromterminfo?
Maybe, but it's not a drop-in replacement, as Smulx requires an argument.
But when I examine the output of
set termcap?,t_Csis not listed.
Are you sure it's not listed below among the longer sequences?
(Interestingly,
t_Ceis listed and is empty.)
Yes, that is expected because there is no terminfo entry for Ce. (infocmp -1x | grep Ce)
(As an aside, like in #2424, for me Vim isn't falling back to underline when
:hi SpellBad cterm=undercurlis set. Maybe 45a0000 was inadvertently reverted somehow?)
Does fallback work after doing :set t_Cs=?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
But when I examine the output of
set termcap?,t_Csis not listed.Are you sure it's not listed below among the longer sequences?
My mistake, it is indeed listed among the longer sequences, manifesting the problem:
t_Cs=^[]12;%p1%s^G
Does fallback work after doing
:set t_Cs=?
It's not falling back to the underline, but is instead showing up with a different background colour, not an underline.
PS - Sorry for the delay in responding, I missed the notification that you had responded.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()