https://bugs.kde.org/show_bug.cgi?id=507017
Genevieve Mendoza <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kdebugzilla@genevievemendoz | |a.com --- Comment #1 from Genevieve Mendoza <[email protected]> --- +1, this would be useful for me as a user of TUIs like the `helix` editor. Konsole's default TERM=xterm-256color understates what Konsole actually supports. Konsole has supported the kitty-style extended underline protocol (curly/dotted/dashed underlines with a separate color via CSI 4:n and CSI 58:...) since Konsole 22.12, via bug 387811 (https://bugs.kde.org/show_bug.cgi?id=387811) and MR !722 (https://invent.kde.org/utilities/konsole/-/merge_requests/722). (Test this with `printf '\e[4:3m\e[58:2::255:0:0mtest\e[0m\n'` which renders a red undercurl.) Applications, however, have no way to discover this: - xterm-256color terminfo doesn't advertise Smulx/Setulc/Su, and it can't, since that entry describes generic xterm rather than Konsole. - Unlike VTE-based terminals, which set $VTE_VERSION (which Helix, Neovim, and others check), Konsole has never had an environment-variable convention for advertising capabilities. - Konsole doesn't ship its own terminfo entry, so there's no konsole-named entry users can point $TERM at that would advertise its true capabilities. The konsole/konsole-256color entries in ncurses are maintained by Thomas Dickey, not KDE, and also lack Smulx/Setulc/Su. A TUI app trying to determine terminal capabilities (checking terminfo, then known env vars) concludes Konsole doesn't support extended underlines, even though it does. For an example of how TUI apps check this, see: <https://github.com/helix-editor/helix/blob/c104065/helix-tui/src/backend/crossterm.rs#L82>. It checks terminfo and some known env vars but ends up concluding Konsole doesn't support extended underlines. Therefore, Helix renders LSP diagnostics as flat underlines in the wrong color in Konsole, while rendering them as red curly underlines via the identical code path in alacritty or any VTE-based terminal. It provides an override `editor.undercurl` but this requires user effort. Overriding TERM=alacritty or custom user-local terminfo work but are messy. XTGETTCAP solves this generically for `Smulx` and other capabilities (including over SSH) and the ecosystem is moving in that direction. It's already implemented by xterm, kitty, foot, WezTerm, and Ghostty, as well as systemd as the original report mentioned. Starting off with support for TN, Co, and RGB or the extended underline capabilities (Smulx, Setulc, Su) would make life easier for many konsole users. In the long term, konsole could follow kitty's and foot's pattern of responding to all terminfo queries. -- You are receiving this mail because: You are watching all bug changes.
