Created attachment 176000 [details] Example of what the undercurl color looks like in Konsole SUMMARY The color of underline/undercurl as set in vim does not display in Konsole STEPS TO REPRODUCE 1. In a .vimrc file in home directory (cd ~), add the following settings: ``` 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=underline cterm=underline gui=underline ``` then save the file. 2. Open vim, and then type a misspelled word. OBSERVED RESULT We see a red undercurl in other terminals such as: iterm2 and xfce4-terminal:1.1.3, but not in Konsole. The color of the undercurl remains the same color as the text. EXPECTED RESULT The undercurl color should red. SOFTWARE/OS VERSIONS (available in the Info Center app, or by running `kinfo` in a terminal window) Linux/KDE Plasma: 6.2.0 KDE Plasma Version: 6.2.0 KDE Frameworks Version: 6.7.0 Qt Version: 6.8.0 ADDITIONAL INFORMATION Konsole clearly could support color undercurls as `echo -e "\e[4:3m\e[58:2::215:58:103mThis text has an undercurl with color\e[4:0m"` works in Konsole. I have no idea why setting color undercurl in vim does not work. This may be a vim specific issue, but it seems that my vim settings above work in other terminals, just not in Konsole, and I cannot figure out why. If it helps, highlighting in vim is defined in https://github.com/vim/vim/blob/master/src/highlight.c.
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