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

From: Eli Zaretskii <[email-masked]>
Date: Mon, 12 Sep 2022 14:58:26 +0300

> Date: Sun, 11 Sep 2022 20:35:47 +0000
> From: Gregory Heytings <[email-masked]>
> cc: Akib Azmain Turja <[email-masked]>, [email-masked]
> 
> 1. emacs -Q -nw
> 
> 2a. if your terminal emulator has a light background: M-x load-theme RET 
> modus-vivendi RET
> 
> 2b. if your terminal emulator has a dark background: M-x load-theme RET 
> modus-operandi RET

These do nothing in my case, but I don't think that's crucial.

> Observe at that point that the last character (the one at the bottom 
> right) does not have the background color of the chosen theme.  So far so 
> good.

Doesn't happen here (and why "good"?).

> 3. M-: (define-key minibuffer-mode-map (kbd "C-t") (defun bug57728 () (interactive) (dotimes (i 5000) (insert (+ (% (random) 26) ?a))))) RET
> 
> 4. M-: C-t
> 
> 5. Now hit C-p a few times, until you see the "\" continuation character 
> appear on the last character (the one at the bottom right).  This should 
> not happen.

It does happen.  Why do you think it shouldn't?  Those are all
continued lines, so they should all end with a '\'.

However, if I now C-n enough times to have the mini-window scroll, I
see that lines scrolled into the view don't have the '\' continuation
glyph.  _That_ shouldn't happen.  So I finally have something to work
with, thanks.

Curiously, this doesn't happen in a normal window, only in the
mini-window.  Hmm...

> (Note that the "\" continuation character disappears with C-l, after step 
> 5 and after step 6.)

Yes, because C-l redraws TTY frames.