Subject: bug#58228: 29.0.50; ansi-term display garbled

From: Matthias Meulien <[email-masked]>
Date: Sat, 01 Oct 2022 22:06:03 +0200

Lars Ingebrigtsen <[email-masked]> writes:

> Jose A Ortega Ruiz <[email-masked]> writes:
>
>> - M-x ansi-term (accept default /bin/bash)
>>
>> - type anything in the bash prompt that produces output, a simple ls
>>   will suffice: the output is garbled, sometimes non-existent (the
>>   effect is very dramatic for ncurses apps).
>
> Perhaps this is related to the recent comint/osc stuff?  I've added
> Matthias to the CCs.

I don't think so.  For example running ansi-term after setting
comint-output-filter-functions to nil leads to the same garbled output.

Bisecting between the parent of (working as expected and not containing
any of my changes to the OSC stuff):

7354f4e3e6..: Matthias Meulien 2022-09-18 Extract support of OSC escape
sequences from comint

and the broken:

cd4208f6d8..: Miha Rihtaršič 2022-09-30 Rename comint-fl-* to
comint-fontify-input-* and mention it in NEWS

leads to the first bad comit being:

matthias@carbon:~/Sources/emacs ((12a78711c9...) $|BISECTING)
↳ git bisect good
3553904a90a242b7ee7b48607ac02cf57e2ab753 is the first bad commit
commit 3553904a90a242b7ee7b48607ac02cf57e2ab753
Author: Eli Zaretskii <[email-masked]>
Date:   Fri Sep 30 15:38:22 2022 +0300

    Fix some issues with vertical-motion in bidi-reordered text
    
    This fixes some uses of vertical-motion when a screen line
    starts withcharacters of directionality that is opposite to
    the current paragraph's base direction.
    * src/xdisp.c (move_it_vertically_backward): Adjust NLINES to
    compensate for its increasing when DY == 0.

 src/xdisp.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

-- 
Matthias