[4:0m # no underline
[4:1m # straight underline
[4:2m # double underline
[4:3m # curly underline
[4:4m # dotted underline
[4:5m # dashed underline
[4m # straight underline (for backwards compat)
[24m # no underline (for backwards compat)
To set the underline color (this is reserved and as far as I can tell not actually used for anything):
[58...m
This works exactly like the codes 38, 48 that are used to set foreground and background color respectively.
To reset the underline color (also previously reserved and unused):
[59m
In this initial step we currently don't support straight/double/curly/dotted/dashed nor colored underlines, but parse them and map them to normal underlines. Fixes https://github.com/termux/termux-packages/issues/20620, escape sequences showing up at the start of neovim. Future follow up work is actually respecting them when rendering, which is (at least IMHO) a nice touch when using code editors with support for it such as neovim.
Colon separated escape sequences for setting colors
It seems that more and more terminal emulators and terminal programs supports colon (
:
) as well as semicolon (;
) to specify colors:See https://github.com/termstandard/colors?tab=readme-ov-file#truecolor-support-in-output-devices, where it can be seen that multiple terminal emulators also support using a colon as delimiter nowadays:
This is now implemented in Termux as well. Fixes https://github.com/termux/termux-packages/issues/20655, escape sequence issues with
vtm
.See https://github.com/alacritty/vte/issues/22 for a discussion when this was implemented in
alacritty/vte
.Colored and styled underlines parsing
We also here start to parse Colored and styled underlines as initially proposed by Kitty:
In this initial step we currently don't support straight/double/curly/dotted/dashed nor colored underlines, but parse them and map them to normal underlines. Fixes https://github.com/termux/termux-packages/issues/20620, escape sequences showing up at the start of neovim. Future follow up work is actually respecting them when rendering, which is (at least IMHO) a nice touch when using code editors with support for it such as neovim.