Currently the Termux terminal emulator prints HI in red with:
printf "\e[31;m HI \e[0m"
This is not how other terminals (tested on xterm, gnome-terminal, alacritty and the mac built in terminal) handle it, since they parse \e[31;m as \e[31;0m, where the 0 resets the colors.
This change aligns with other terminals, as well as improves performance by avoiding allocating a new int[] array for each byte processed by parseArg(), and most importantly simplifies things by removing the mIsCSIStart and mLastCSIArg state, preparing for soon supporting : separated sub parameters such as used in
https://sw.kovidgoyal.net/kitty/underlines/
Currently the Termux terminal emulator prints
HI
in red with:This is not how other terminals (tested on xterm, gnome-terminal, alacritty and the mac built in terminal) handle it, since they parse
\e[31;m
as\e[31;0m
, where the0
resets the colors.This change aligns with other terminals, as well as improves performance by avoiding allocating a new
int[]
array for each byte processed byparseArg()
, and most importantly simplifies things by removing themIsCSIStart
andmLastCSIArg
state, preparing for soon supporting:
separated sub parameters such as used in https://sw.kovidgoyal.net/kitty/underlines/