Am 14.10.19 um 13:13 schrieb Johannes Schindelin:
> Hi René,
>
> On Sun, 13 Oct 2019, René Scharfe wrote:
>
>> This changes the behavior, though: The old code skips all kinds of
>> Control Sequence Introducer sequences, while utf8_strnwidth() only skips
>> the Select Graphic Rendition kind, i.e. those ending with "m".  They are
>> used for specifying color and font attributes like boldness.  The only
>> other kind of escape sequence we print in Git is Erase in Line, ending
>> with "K".  That's not used for columnar output, so this difference
>> actually doesn't matter here.
>
> Arguably, the "Erase in Line" thing should re-set the width to 0, no?
> But as you say, this is not needed for this patch.

It doesn't move the cursor, just clears the characters to the right, to
the left or both sides, depending on its parameter.  So ignoring it for
width calculation like  the old code did would be appropriate -- if we'd
encounter such an escape sequence in text to be shown in columns.

René

Reply via email to