Re: [PATCH v2] utf8: add display_mode_esc_sequence_len_counted()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 17, 2026, 23:25 UTC
- Message-ID
- <xmqq33szavmy.fsf@gitster.g>
- In-Reply-To
- <CAHWeT-Zt=1MjD=fbOiAiQtb28Q4DAR_wF12iymXmeXzGyyLgbQ@mail.gmail.com>
Andy Koppe <andy.koppe@gmail.com> writes:
Show 6 quoted lines
> Junio C Hamano wrote:
>
>> - while (isdigit(*p) || *p == ';')
>> + while (p < end && (isdigit(*p) || *p == ';'))
>
> While you're there, could you add colons (':') to that?Do we generate such a sequence that uses subseparators?
IIRC, this code is not counting the display width of end-user supplied string. Rather, it gets string we paint in a buffer and then counts how much display column it occupies.