Thread View: linux.kernel.git
1 messages
1 total messages
Started by Junio C Hamano
Wed, 18 Nov 2026 21:49
Re: [PATCH v2 3/4] utf8: respect string boundaries after skipping ANSI escape sequences
Author: Junio C Hamano
Date: Wed, 18 Nov 2026 21:49
Date: Wed, 18 Nov 2026 21:49
31 lines
13330 bytes
13330 bytes
Dirk Gouders <dirk@gouders.net> writes:
> - while (skip_ansi &&
> - (skip = display_mode_esc_sequence_len_counted(string,
> - orig + len - string)) != 0)
> - string += skip;
> + if (skip_ansi ) {
Drop excess SP after the variable.
> + while ((skip = display_mode_esc_sequence_len_counted(string,
> + orig + len - string)) != 0)
> + string += skip;
Overlong line. You can (and are encouraged to) omit comparison with
zero "!= 0" to lose 5 columns but it still is overly long.
if (skip_ansi) {
while ((skip = display_mode_esc_sequence_len_counted(
string, orig + len - string)))
string += skip;
or something, perhaps.
> + if (string >= orig + len)
> + break;
> + }
>
> glyph_width = utf8_width(&string, NULL);
> if (glyph_width > 0)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads