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#33363: 26.1; display problem with mode-line turned off on terminal Date: Sat, 17 Nov 2018 14:44:26 +0200 Message-ID: <83pnv3ub4l.fsf@gnu.org> References: <773094C5-ABD7-4D0D-84D0-1CC60D04CBFB@tenpoint.co.nz> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1542458587 30685 195.159.176.226 (17 Nov 2018 12:43:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 17 Nov 2018 12:43:07 +0000 (UTC) Cc: 33363@debbugs.gnu.org To: Nick Helm Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 17 13:43:03 2018 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 1gNzwD-0007m8-OG for geb-bug-gnu-emacs@m.gmane.org; Sat, 17 Nov 2018 13:43:01 +0100 Original-Received: from localhost ([::1]:49058 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNzyJ-0003A9-W3 for geb-bug-gnu-emacs@m.gmane.org; Sat, 17 Nov 2018 07:45:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNzyD-00039r-VH for bug-gnu-emacs@gnu.org; Sat, 17 Nov 2018 07:45:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gNzyA-0006wd-P3 for bug-gnu-emacs@gnu.org; Sat, 17 Nov 2018 07:45:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52865) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gNzyA-0006wS-LE for bug-gnu-emacs@gnu.org; Sat, 17 Nov 2018 07:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gNzyA-0008RN-FV for bug-gnu-emacs@gnu.org; Sat, 17 Nov 2018 07:45: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: Sat, 17 Nov 2018 12:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33363 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33363-submit@debbugs.gnu.org id=B33363.154245867732398 (code B ref 33363); Sat, 17 Nov 2018 12:45:02 +0000 Original-Received: (at 33363) by debbugs.gnu.org; 17 Nov 2018 12:44:37 +0000 Original-Received: from localhost ([127.0.0.1]:57123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gNzxl-0008QU-AH for submit@debbugs.gnu.org; Sat, 17 Nov 2018 07:44:37 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gNzxj-0008QH-SY for 33363@debbugs.gnu.org; Sat, 17 Nov 2018 07:44:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gNzxa-0005z4-Ms for 33363@debbugs.gnu.org; Sat, 17 Nov 2018 07:44:30 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37806) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNzxa-0005z0-Js; Sat, 17 Nov 2018 07:44:26 -0500 Original-Received: from [176.228.60.248] (port=3088 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gNzxa-0000FC-7V; Sat, 17 Nov 2018 07:44:26 -0500 In-reply-to: <773094C5-ABD7-4D0D-84D0-1CC60D04CBFB@tenpoint.co.nz> (message from Nick Helm on Tue, 13 Nov 2018 16:40:23 +1300) 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:152469 Archived-At: > From: Nick Helm > Date: Tue, 13 Nov 2018 16:40:23 +1300 > > Running Emacs in a terminal and setting mode-line-format to nil can > cause incorrect display of buffer contents. Right. And it's a very old bug. > emacs -Q -nw > M-: (setq mode-line-format nil) > C-x C-f lisp/org/org.el.gz ;for example > RET RET RET... DEL DEL DEL... ;add and delete white-space > > Note the second-to-last row in the window, which formerly held the > mode-line, does not display the buffer contents correctly and any buffer > line that moves through the last row (when back-spacing) appears blank > further up the window. The immediate cause of this is that we miscalculate the number of lines in the window in this case, and then instruct the terminal to delete the wrong line. I'm debating how best to fix this; stay tuned. > I mainly observe this in emacs-lisp-mode and org-mode. The problem > doesn't seem to occur when: > > + in fundamental-mode, c-mode or text-mode, or > + visual-line-mode is active, or > + the frame contains more than one window (v or h split), or > + avoiding display of each line (e.g. C-u 10 RET C-u 10 DEL). The offending code is a redisplay optimization, and is used only under very specific conditions. That's why it doesn't rear its ugly head in many situations. Thanks.