unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: schwab@suse.de, teirllm@dms.auburn.edu, deego@glue.umd.edu,
	emacs-devel@gnu.org
Subject: Re: Redisplay bug
Date: 26 Aug 2002 01:10:51 +0200	[thread overview]
Message-ID: <5xy9auwn44.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <200208241211.g7OCBeh11786@wijiji.santafe.edu>

Richard Stallman <rms@gnu.org> writes:

>     I found a specific part of Richard's change to xdisp.c which seems
>     to cause the redisplay problem, so I have reverted that change.
> 
>     But now the redisplay again has a habit of leaving the cursor on
>     partially visible lines at the top or bottom of the window (which
>     I believe is what Richard tried to fix).  
> 
> Of course.  Reverting that part of the change shows you found the
> right place, but it is not the right fix.
> 
> Can you show me which change it was?

Here is the change I made.  Only one line of code with a large comment
on why I changed this.  Hope it is enough for you to work on.

Index: xdisp.c
===================================================================
RCS file: /cvs/emacs/src/xdisp.c,v
retrieving revision 1.776
retrieving revision 1.777
diff -c -r1.776 -r1.777
*** xdisp.c	9 Aug 2002 17:29:11 -0000	1.776
--- xdisp.c	22 Aug 2002 16:52:56 -0000	1.777
***************
*** 10365,10371 ****
  	}
  
        if (!make_cursor_line_fully_visible (w))
! 	goto try_to_scroll;
  #if GLYPH_DEBUG
        debug_method_add (w, "forced window start");
  #endif
--- 10365,10408 ----
  	}
  
        if (!make_cursor_line_fully_visible (w))
! 	{
! 	  /* CVS rev. 1.761 had changed this to ``goto try_to_scroll''.
! 
! 	     The intention of the fix -- AFAIU -- was to ensure that 
! 	     the cursor didn't end up on a partially visible last (or
! 	     first?) line when scrolling.
! 
! 
! 	     But that change causes havoc when scrolling backwards and
! 	     a partially visible first (or last?) line is present when
! 	     we reach the top of the buffer.  In effect, the text
! 	     already in the window is repeated (each line is appended
! 	     to the same or another lines in the window)...
! 
! 	     I changed it back to ``goto need_larger_matrices'' which
! 	     in effect mean that we don't go through `try_scrolling'
! 	     when the cursor is already at the first line of the buffer,
! 	     and there is really only a few pixels [rather than lines]
! 	     to scroll backwards.  I guess move_it_by_lines etc. really
! 	     isn't the right device for doing that, ref. the code in
! 	     make_cursor_line_fully_visible which was also disabled by
! 	     CVS rev. 1.761.
! 
! 	     But how do we know that we are already on the top line of
! 	     the window showing the first line in the buffer, so that
! 	     scrolling really wont help here?
! 
! 	     I cannot find a simple fix for this (I tried various
! 	     approaches), but I prefer to an occasional partial line
! 	     rather than the visual messup, so I reverted this part of
! 	     the fix.
! 
! 	     Someone will need to look into this when time allows.
! 
! 	     -- 2002-08-22, Kim F. Storm  */
! 
! 	  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-08-25 23:10 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-18 21:14 Redisplay bug Andreas Schwab
2002-08-18 21:19 ` D. Goel
2002-08-18 21:45   ` Luc Teirlinck
2002-08-18 21:52     ` Andreas Schwab
2002-08-18 22:09       ` Andreas Schwab
2002-08-18 23:40       ` Kim F. Storm
2002-08-19 18:39         ` Richard Stallman
2002-08-20  0:07           ` Kim F. Storm
2002-08-22 19:10             ` Kim F. Storm
2002-08-22 21:21               ` Lute Kamstra
2002-08-22 23:17                 ` Kim F. Storm
2002-08-24 12:11               ` Richard Stallman
2002-08-25 23:10                 ` Kim F. Storm [this message]
2002-08-26  5:04                   ` Eli Zaretskii
2002-08-26 21:51                     ` Richard Stallman
2002-08-31 16:58                   ` Richard Stallman
2002-09-02  6:24                     ` Juanma Barranquero
2002-09-02  6:40                       ` Miles Bader
2002-09-02  7:06                         ` Juanma Barranquero
2002-08-18 22:49 ` Simon Josefsson

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=5xy9auwn44.fsf@kfs2.cua.dk \
    --to=storm@cua.dk \
    --cc=deego@glue.umd.edu \
    --cc=emacs-devel@gnu.org \
    --cc=schwab@suse.de \
    --cc=teirllm@dms.auburn.edu \
    /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).