From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#25666: Screen rendering bug Date: Sun, 12 Feb 2017 18:47:24 +0200 Message-ID: <83d1en2w6b.fsf@gnu.org> References: <83poir3xtt.fsf@gnu.org> <87inofl7x0.fsf@users.sourceforge.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1486918095 5113 195.159.176.226 (12 Feb 2017 16:48:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 12 Feb 2017 16:48:15 +0000 (UTC) Cc: fredde1994@gmail.com, 25666@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 12 17:48:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ccxJo-0000hd-13 for geb-bug-gnu-emacs@m.gmane.org; Sun, 12 Feb 2017 17:48:08 +0100 Original-Received: from localhost ([::1]:52642 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccxJr-0002EN-Nc for geb-bug-gnu-emacs@m.gmane.org; Sun, 12 Feb 2017 11:48:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccxJl-0002E7-Pm for bug-gnu-emacs@gnu.org; Sun, 12 Feb 2017 11:48:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ccxJi-0000UF-L1 for bug-gnu-emacs@gnu.org; Sun, 12 Feb 2017 11:48:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39018) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ccxJi-0000Tw-HH for bug-gnu-emacs@gnu.org; Sun, 12 Feb 2017 11:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ccxJi-0001AP-Az for bug-gnu-emacs@gnu.org; Sun, 12 Feb 2017 11:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Feb 2017 16:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25666 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 25666-submit@debbugs.gnu.org id=B25666.14869180434437 (code B ref 25666); Sun, 12 Feb 2017 16:48:02 +0000 Original-Received: (at 25666) by debbugs.gnu.org; 12 Feb 2017 16:47:23 +0000 Original-Received: from localhost ([127.0.0.1]:37216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ccxJ4-00019V-P7 for submit@debbugs.gnu.org; Sun, 12 Feb 2017 11:47:22 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:38155) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ccxJ3-00019I-IR for 25666@debbugs.gnu.org; Sun, 12 Feb 2017 11:47:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ccxIv-0000Kn-5D for 25666@debbugs.gnu.org; Sun, 12 Feb 2017 11:47:16 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48339) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccxIv-0000Kj-1r; Sun, 12 Feb 2017 11:47:13 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3807 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ccxIu-0006SK-6X; Sun, 12 Feb 2017 11:47:12 -0500 In-reply-to: <87inofl7x0.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:129266 Archived-At: > From: npostavs@users.sourceforge.net > Cc: Eli Zaretskii , 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.