Mercurial > emacs
changeset 47000:005cc008b551
(redisplay_window): Do not `goto try_to_scroll' when we
end up on a partially visible line; this reverts a specific part
of the 2002-07-07 change by Richard M. Stallman to "fix" a nasty
display error which has been reported several times now.
However it introduces the problem that changes was supposed to fix.
See my comments in the source if you want to debug this further.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Thu, 22 Aug 2002 16:52:56 +0000 |
parents | efdf72a789fc |
children | 66b6d19633ed |
files | src/xdisp.c |
diffstat | 1 files changed, 38 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xdisp.c Thu Aug 22 16:52:22 2002 +0000 +++ b/src/xdisp.c Thu Aug 22 16:52:56 2002 +0000 @@ -10365,7 +10365,44 @@ } if (!make_cursor_line_fully_visible (w)) - goto try_to_scroll; + { + /* 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