unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: npostavs@users.sourceforge.net
Cc: fredde1994@gmail.com, 25666@debbugs.gnu.org
Subject: bug#25666: Screen rendering bug
Date: Sun, 12 Feb 2017 18:47:24 +0200	[thread overview]
Message-ID: <83d1en2w6b.fsf@gnu.org> (raw)
In-Reply-To: <87inofl7x0.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net)

> From: npostavs@users.sourceforge.net
> Cc: Eli Zaretskii <eliz@gnu.org>,  25666@debbugs.gnu.org
> Date: Sun, 12 Feb 2017 10:56:27 -0500
> 
> retitle 25666 split-screen + linum-mode in tall TTY fails to fully render other window after scrolling

That's not really accurate, see below.

> I can reproduce this.  Doing C-l fixes it, and I can't reproduce after
> that until I delete and resplit the window.  My terminal is urxvt.

I see the same here.  The frame dimensions are not relevant, btw: I
can see this with any dimensions I tried.  But it only happens on a
text terminal that uses terminfo/termcap; the MS-Windows text-mode
Emacs doesn't have this problem.

> I can't reproduce in 24.3.

Yes, it started in Emacs 24.4.

> I notice that the `linum' face is rendered identically to the default
> face in 24.4 and up.  Could be related.

My guess is it's unrelated.  But I don't really know.

> It doesn't happen with nlinum-mode, probably because with nlinum-mode
> when the left window scrolls, the margin in the right window is widened
> too.

I see this with nlinum-mode as well.  My terminal is PuTTY (which
emulates xterm).

You can also trigger a slightly different messup by "M-<" after the
first scroll (which by itself looks OK).

What happens is this: Emacs thinks the non-selected window is empty,
so it correctly decides that the best strategy to redisplay the
selected window is to scroll the entire frame half-height up, then
display the bottom part of the selected window from its buffer text.

Why it thinks the non-selected window is empty?  Here's where the plot
thickens.  The non-selected window doesn't need to be updated, so
Emacs correctly uses its "current" glyph matrix instead of the
"desired" matrix.  But the current matrix describes 35 empty lines.
It does that because on the first cursor motion after the previous
half-window scroll of the selected window, the desired matrix is
copied into the current one, and that "empties" the current matrix.
Not sure why the latter happens.

That is as far as I got debugging this.

I also found a work-around: invoke C-l or redraw-display immediately
after "C-x 3".  Then the problem never happens.  So this sounds like
some missing initialization, somewhere.





  reply	other threads:[~2017-02-12 16:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-09  8:23 bug#25666: Screen rendering bug Fredrik Ljungdahl
2017-02-09 20:37 ` Eli Zaretskii
2017-02-09 21:37   ` Fredrik Ljungdahl
2017-02-10  8:29     ` Eli Zaretskii
2017-02-10  9:12       ` Fredrik Ljungdahl
2017-02-10  9:43         ` Fredrik Ljungdahl
2017-02-10 10:22         ` Eli Zaretskii
2017-02-10 10:44           ` Fredrik Ljungdahl
2017-02-12 15:56     ` npostavs
2017-02-12 16:47       ` Eli Zaretskii [this message]
2017-02-12 17:15         ` npostavs
2017-02-12 18:24           ` Eli Zaretskii
2017-02-12 18:59             ` npostavs
2017-02-12 19:49               ` Eli Zaretskii
2022-02-21 15:40 ` bug#25666: split-screen + linum-mode in tall TTY fails to fully render other window after scrolling Lars Ingebrigtsen
2022-03-21 18:30   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83d1en2w6b.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=25666@debbugs.gnu.org \
    --cc=fredde1994@gmail.com \
    --cc=npostavs@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).