All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Andy Koppe <andy.koppe@gmail.com>
Cc: git@vger.kernel.org,  Dirk Gouders <dirk@gouders.net>
Subject: Re: [PATCH v2] utf8: add display_mode_esc_sequence_len_counted()
Date: Tue, 17 Nov 2026 15:25:09 -0800	[thread overview]
Message-ID: <xmqq33szavmy.fsf@gitster.g> (raw)
In-Reply-To: <CAHWeT-Zt=1MjD=fbOiAiQtb28Q4DAR_wF12iymXmeXzGyyLgbQ@mail.gmail.com> (Andy Koppe's message of "Tue, 17 Nov 2026 23:08:20 +0000")

Andy Koppe <andy.koppe@gmail.com> writes:

> 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.

  reply	other threads:[~2026-11-17 23:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 16:50 [PATCH] utf8: make display_mode_esc_sequence_len() take a length Junio C Hamano
2026-11-17 20:06 ` [PATCH v2] utf8: add display_mode_esc_sequence_len_counted() Junio C Hamano
2026-11-17 21:26   ` Dirk Gouders
2026-11-17 21:43     ` Junio C Hamano
2026-11-17 22:03       ` Dirk Gouders
2026-11-18  1:33         ` Junio C Hamano
2026-11-18  7:37           ` Dirk Gouders
2026-11-17 23:08   ` Andy Koppe
2026-11-17 23:25     ` Junio C Hamano [this message]
2026-11-18  6:59       ` Andy Koppe
2026-11-18  7:43         ` Dirk Gouders

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq33szavmy.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=andy.koppe@gmail.com \
    --cc=dirk@gouders.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.