Subject: bug#57728: 29.0.50; Emacs writes wrong glyph at the bottom-right corner of text terminals

From: Eli Zaretskii <[email-masked]>
Date: Sun, 11 Sep 2022 17:33:11 +0300

> From: Akib Azmain Turja <[email-masked]>
> Cc: [email-masked]
> Date: Sun, 11 Sep 2022 19:38:45 +0600
> 
>   1. Run emacs -Q.

"emacs -Q -nw", I guess?  We are talking about TTY display, right?

>   2. M-: (or any other command that asks for a string).
>   3. Write some garbage until the minibuffer window scrolls.  (I used
>      (dotimes (i 10000) (+ (% (random) 26) ?a)) to generate the garbage
>      in *scratch* buffer and copied to the minibuffer, but you can write
>      anything you want.)

Will this do:

  M-: ssssssssssssssssssssssssssssssssssssssssssssssssssss

(keep typing 's' until you get past the right edge of the window, and
the minibuffer resizes to be 2 screen lines instead of just one)?

>   4. Scroll down a line.

With C-n? or with something else?

>   5. You should now see that the last character cell (i.e. the character
>      cell on the bottom-left corner) contains a continuation ('\')
>      glyph.

Bottom-left corner or bottom-right corner?  If bottom-right, then this
'\' is the continuation glyph, telling you that the line is continued
on the next screen line.

>   6. Scroll up two lines.

With C-p?

Also, I cannot scroll up two lines unless I first make the mini-window
at least lines high.

>   7. The continuation glyph on the line before the last one doesn't
>      appear.  Tested on Linux console, St, Xterm and Kitty.

I don't see this here, but maybe that's because my terminal isn't
kitty.  It does behave like xterm, though.

>   8. Scroll down more than two lines.
>   9. Exit minibuffer.  The continuation glyph will still stay there on
>      some terminals.  Tested on St, Kitty.

Here, it never goes away.

> I hope this is clearer.

Unfortunately, not really.

Thanks.