[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Redisplay bug
From: |
Kim F. Storm |
Subject: |
Re: Redisplay bug |
Date: |
26 Aug 2002 01:10:51 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
Richard Stallman <address@hidden> 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 <address@hidden> http://www.cua.dk
- Re: Redisplay bug, (continued)
- Re: Redisplay bug, Luc Teirlinck, 2002/08/18
- Re: Redisplay bug, Andreas Schwab, 2002/08/18
- Re: Redisplay bug, Andreas Schwab, 2002/08/18
- Re: Redisplay bug, Kim F. Storm, 2002/08/18
- Re: Redisplay bug, Richard Stallman, 2002/08/19
- Re: Redisplay bug, Kim F. Storm, 2002/08/19
- Re: Redisplay bug, Kim F. Storm, 2002/08/22
- Re: Redisplay bug, Lute Kamstra, 2002/08/22
- Re: Redisplay bug, Kim F. Storm, 2002/08/22
- Re: Redisplay bug, Richard Stallman, 2002/08/24
- Re: Redisplay bug,
Kim F. Storm <=
- Re: Redisplay bug, Eli Zaretskii, 2002/08/26
- Re: Redisplay bug, Richard Stallman, 2002/08/26
- Re: Redisplay bug, Richard Stallman, 2002/08/31
Re: Redisplay bug, Simon Josefsson, 2002/08/18