mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-07 19:14:04 +08:00
Currently the Termux terminal emulator prints "HI" in red with: ```sh 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 supporting ':' separated sub parameters such as used in https://sw.kovidgoyal.net/kitty/underlines/