unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: rms@gnu.org, David Ponce <david@dponce.com>
Subject: [PATCH] Re: Display bug using bold/italic faces & header line
Date: 16 Jul 2002 02:08:25 +0200	[thread overview]
Message-ID: <5x8z4cbkli.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <3D32EFE1.1060102@dponce.com>

David Ponce <david@dponce.com> 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  <rms@gnu.org>
> 
> * 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 <storm@cua.dk> http://www.cua.dk

  reply	other threads:[~2002-07-16  0:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-15 15:53 Display bug using bold/italic faces & header line David Ponce
2002-07-16  0:08 ` Kim F. Storm [this message]
2002-07-17  3:04   ` [PATCH] " Richard Stallman
2002-07-17  9:04     ` Kim F. Storm

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=5x8z4cbkli.fsf@kfs2.cua.dk \
    --to=storm@cua.dk \
    --cc=david@dponce.com \
    --cc=rms@gnu.org \
    /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).