Re: [PATCH v2] utf8: add display_mode_esc_sequence_len_counted()
- From
Andy Koppe <andy.koppe@gmail.com>
- Date
- Nov 17, 2026, 23:08 UTC
- Message-ID
- <CAHWeT-Zt=1MjD=fbOiAiQtb28Q4DAR_wF12iymXmeXzGyyLgbQ@mail.gmail.com>
- In-Reply-To
- <xmqqqzgjcjes.fsf@gitster.g>
Junio C Hamano wrote:
> - while (isdigit(*p) || *p == ';') > + while (p < end && (isdigit(*p) || *p == ';'))
While you're there, could you add colons (':') to that?ECMA-48 §5.4.2 defines them as sub-separators within the semicolon-separated parameters of control sequences. Colons are referred to as "3/10" there, aka ASCII 0x3A:
https://ecma-international.org/wp-content/uploads/ECMA-48_5th_edition_june_1991.pdf#page=26
Maybe more practically relevant, xterm and its many more-or-less-compatible brethren accept colons in SGR sequences:
"xterm allows either colons (standard) or semicolons (legacy) to separate the subparameters (but after the first colon, colons must be used)" https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
Andy