Summary: | Color of Underline/Undercurl cannot be set within vim when using Konsole | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | terrycchau <terrycchau> |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED DOWNSTREAM | ||
Severity: | normal | CC: | john.kizer, matan |
Priority: | NOR | ||
Version First Reported In: | 24.08.2 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Example of what the undercurl color looks like in Konsole
Example of what the undercurl color looks like in xfce-terminal Output showing that Konsole is capable of undercurl colors |
Description
terrycchau@gmail.com
2024-11-21 10:19:56 UTC
Created attachment 176001 [details]
Example of what the undercurl color looks like in xfce-terminal
Created attachment 176002 [details]
Output showing that Konsole is capable of undercurl colors
(In reply to terrycchau@gmail.com from comment #2) > Created attachment 176002 [details] > Output showing that Konsole is capable of undercurl colors What if you add the color sequence to t_Cs? Since colored underlines do work, my first guess would be that vim sends different escape sequences. Is $TERM the same in both cases? Can you run vim using `script` to see what escape sequences are actually sent? I should clarify that the .vimrc used contains: ``` set termguicolors setlocal spell try | lang en_US | catch | endtry set spelllang=en_us let &t_Cs = "\e[4:3m" let &t_Ce = "\e[4:0m" hi SpellBad term=undercurl cterm=undercurl gui=undercurl guifg=NONE ctermfg=NONE guisp=#d73a49 ctermbg=None ``` (In reply to Matan Ziv-Av from comment #3) > (In reply to terrycchau@gmail.com from comment #2) > > Created attachment 176002 [details] > > Output showing that Konsole is capable of undercurl colors > > What if you add the color sequence to t_Cs? > Setting let &t_Cs = "\e[4:3m\e[58:2::215:58:103m" would change the underline color to red. > Since colored underlines do work, my first guess would be that vim sends > different escape sequences. Is $TERM the same in both cases? > $TERM for both xfce-terminal and konsole is `xterm-256color`. > Can you run vim using `script` to see what escape sequences are actually > sent? If by script you mean Ex mode, I could enter that by pressing `Q` in the normal mode in vim, but I am not sure how to actually find the actual escape sequence. Let me know if you have suggestions for commands to run. Good news. I figured out the issue. Somehow &t_8u is being automatically set for vim in other terminals but not in konsole. This is something that needs to be set in vims end. Adding the following resolves issues. ``` let &t_8u = "\e[58;2;%lu;%lu;%lum" ``` &t_8u is set in https://github.com/vim/vim/blob/master/src/term.c I think. Don't have the time to figure it all out atm. Nice catch! Indeed, looks like according to the comments the belief is/was that Konsole doesn't support something that it apparently does: https://github.com/vim/vim/blob/7e501f4d9986866382888e67d8f11faf5767c8f4/src/term.c#L5176 |