aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2002-08-22 16:52:56 +0000
committerKim F. Storm2002-08-22 16:52:56 +0000
commita562ef1ab420abf2a22c0baf19d097be1e243c1d (patch)
treeed2af5b07d2d64965efa1b90b6888a4825096485 /src
parentf92ae6be4ee4bc6df806468f7b349be26d9e5257 (diff)
downloademacs-a562ef1ab420abf2a22c0baf19d097be1e243c1d.tar.gz
emacs-a562ef1ab420abf2a22c0baf19d097be1e243c1d.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c39
1 files changed, 38 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index ba7bfad414c..6387d6d341f 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -10365,7 +10365,44 @@ redisplay_window (window, just_this_one_p)
10365 } 10365 }
10366 10366
10367 if (!make_cursor_line_fully_visible (w)) 10367 if (!make_cursor_line_fully_visible (w))
10368 goto try_to_scroll; 10368 {
10369 /* CVS rev. 1.761 had changed this to ``goto try_to_scroll''.
10370
10371 The intention of the fix -- AFAIU -- was to ensure that
10372 the cursor didn't end up on a partially visible last (or
10373 first?) line when scrolling.
10374
10375
10376 But that change causes havoc when scrolling backwards and
10377 a partially visible first (or last?) line is present when
10378 we reach the top of the buffer. In effect, the text
10379 already in the window is repeated (each line is appended
10380 to the same or another lines in the window)...
10381
10382 I changed it back to ``goto need_larger_matrices'' which
10383 in effect mean that we don't go through `try_scrolling'
10384 when the cursor is already at the first line of the buffer,
10385 and there is really only a few pixels [rather than lines]
10386 to scroll backwards. I guess move_it_by_lines etc. really
10387 isn't the right device for doing that, ref. the code in
10388 make_cursor_line_fully_visible which was also disabled by
10389 CVS rev. 1.761.
10390
10391 But how do we know that we are already on the top line of
10392 the window showing the first line in the buffer, so that
10393 scrolling really wont help here?
10394
10395 I cannot find a simple fix for this (I tried various
10396 approaches), but I prefer to an occasional partial line
10397 rather than the visual messup, so I reverted this part of
10398 the fix.
10399
10400 Someone will need to look into this when time allows.
10401
10402 -- 2002-08-22, Kim F. Storm */
10403
10404 goto need_larger_matrices;
10405 }
10369#if GLYPH_DEBUG 10406#if GLYPH_DEBUG
10370 debug_method_add (w, "forced window start"); 10407 debug_method_add (w, "forced window start");
10371#endif 10408#endif