From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: [PATCH] Re: Display bug using bold/italic faces & header line Date: 16 Jul 2002 02:08:25 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: <5x8z4cbkli.fsf@kfs2.cua.dk> References: <3D32EFE1.1060102@dponce.com> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1026774513 22587 127.0.0.1 (15 Jul 2002 23:08:33 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 15 Jul 2002 23:08:33 +0000 (UTC) Cc: rms@gnu.org, David Ponce Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17UExE-0005sC-00 for ; Tue, 16 Jul 2002 01:08:32 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17UF7s-0004AO-00 for ; Tue, 16 Jul 2002 01:19:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17UEx1-0004zH-00; Mon, 15 Jul 2002 19:08:19 -0400 Original-Received: from mail.filanet.dk ([195.215.206.179]) by fencepost.gnu.org with smtp (Exim 3.35 #1 (Debian)) id 17UEwa-0004xx-00; Mon, 15 Jul 2002 19:07:52 -0400 Original-Received: from kfs2.cua.dk.cua.dk (unknown [10.1.82.3]) by mail.filanet.dk (Postfix) with SMTP id 608477C016; Mon, 15 Jul 2002 23:07:50 +0000 (GMT) Original-To: emacs-devel@gnu.org In-Reply-To: <3D32EFE1.1060102@dponce.com> Original-Lines: 82 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:5771 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:5771 David Ponce writes: > There is a nasty bug in the display engine of the latest CVS version > of Emacs 21 that displays garbaged text in buffers when scrolling up. I saw that too. C-h i C-v C-v M-v M-v is enough to reproduce. > > It seems that the following changes in xdisp.c caused the bug: > > 2002-07-07 Richard M. Stallman > > * xdisp.c (make_cursor_line_fully_visible): Don't try short scrolls. > Instead just return 0 when there is something to be done. > (try_scrolling): If make_cursor_line_fully_visible returns 0, > retry scrolling as if cursor were off the bottom. > (try_cursor_movement): If make_cursor_line_fully_visible returns 0, > return CURSOR_MOVEMENT_MUST_SCROLL. > (redisplay_window): If make_cursor_line_fully_visible returns 0, > go to try_to_scroll. > Yes, the problems are definitely related to those changes. I cannot see from the changelog why these changes were needed, but I assume they solved some problem... Richard, do you recall which? The following patch seems to fix the present problems by undoing two of these changes. However, without knowledge about what the original change was supposed to fix, I don't know if my patch reintroduces that problem. Also, my patch may be incomplete in the sense that there are still cases which display incorrectly... Index: xdisp.c =================================================================== RCS file: /cvs/emacs/src/xdisp.c,v retrieving revision 1.765 diff -c -r1.765 xdisp.c *** xdisp.c 15 Jul 2002 20:37:12 -0000 1.765 --- xdisp.c 15 Jul 2002 22:58:54 -0000 *************** *** 10056,10062 **** set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); try_window (window, startp); if (!make_cursor_line_fully_visible (w)) ! rc = CURSOR_MOVEMENT_MUST_SCROLL; else rc = CURSOR_MOVEMENT_SUCCESS; } --- 10056,10062 ---- set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); try_window (window, startp); if (!make_cursor_line_fully_visible (w)) ! rc = CURSOR_MOVEMENT_NEED_LARGER_MATRICES; else rc = CURSOR_MOVEMENT_SUCCESS; } *************** *** 10347,10353 **** } if (!make_cursor_line_fully_visible (w)) ! goto try_to_scroll; #if GLYPH_DEBUG debug_method_add (w, "forced window start"); #endif --- 10347,10353 ---- } if (!make_cursor_line_fully_visible (w)) ! goto need_larger_matrices; #if GLYPH_DEBUG debug_method_add (w, "forced window start"); #endif -- Kim F. Storm http://www.cua.dk