Re: [PATCH v2 1/4] utf8: add display_mode_esc_sequence_len_counted()
- From
Andy Koppe <andy.koppe@gmail.com>
- Date
- Nov 19, 2026, 21:04 UTC
- Message-ID
- <CAHWeT-YX8FOacV7YypyZ-qmr3Q2T0TEF=_Qy2bVE7jcS0OWvNA@mail.gmail.com>
- In-Reply-To
- <CAHWeT-ZNoDWqTMfCdQg3PZ2bbLD9PTVqeFMms_1dFj8dbReSCg@mail.gmail.com>
Andy Koppe wrote:
Show 14 quoted lines
> Dirk Gouders wrote: > > There is only one user in pretty.c that uses the wrapper. > > I can change it to use the _counted version and we could then drop the > > wrapper. Junio's v1 already included such a change and I could steal it > > from there. > > > > Would that be OK? > > No objection from me. I would change the make_line_colors_self_contained() > function I'm proposing in [1] to the _counted variant anyway if the original > display_mode_esc_sequence_len() is going away, to avoid the performance issue > with the wrapper. > > [1] https://lore.kernel.org/git/e9f88b533dfbd10528c9151e2e87207419d0253d.1794905511.git.andy.koppe@gmail.com
ps: I guess you might as well just drop the _counted suffix then, and basically just add the len parameter to display_mode_esc_sequence_len().