aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2001-12-28 12:42:54 +0000
committerGerd Moellmann2001-12-28 12:42:54 +0000
commit539e92ad44425c488f308b3ed647879131a6302d (patch)
tree9df69d029872fd5b08668bdd65f8504b66b04e17 /src
parent31bc27f60779c4d4a56d4c88908b8c18415db760 (diff)
downloademacs-539e92ad44425c488f308b3ed647879131a6302d.tar.gz
emacs-539e92ad44425c488f308b3ed647879131a6302d.zip
(try_scrolling) <PT below scroll margin>: Add the
height of the cursor line to the amount to scroll.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xdisp.c12
2 files changed, 10 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 7a69d4500fb..6cbd7d57042 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12001-12-28 Gerd Moellmann <gerd@gnu.org>
2
3 * xdisp.c (try_scrolling) <PT below scroll margin>: Add the
4 height of the cursor line to the amount to scroll.
5
12001-12-27 Richard M. Stallman <rms@gnu.org> 62001-12-27 Richard M. Stallman <rms@gnu.org>
2 7
3 * intervals.c (set_point_both): The position after an invisible, 8 * intervals.c (set_point_both): The position after an invisible,
diff --git a/src/xdisp.c b/src/xdisp.c
index f64e3eeabf5..0d25501e1a1 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -9534,13 +9534,11 @@ try_scrolling (window, just_this_one_p, scroll_conservatively,
9534 y0 = it.current_y; 9534 y0 = it.current_y;
9535 move_it_to (&it, PT, 0, it.last_visible_y, -1, 9535 move_it_to (&it, PT, 0, it.last_visible_y, -1,
9536 MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); 9536 MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y);
9537 9537
9538 /* With a scroll_margin of 0, scroll_margin_pos is at the window 9538 /* To make point visible, we have to move the window start
9539 end, which is one line below the window. The iterator's 9539 down so that the line the cursor is in is visible, which
9540 current_y will be same as y0 in that case, but we have to 9540 means we have to add in the height of the cursor line. */
9541 scroll a line to make PT visible. That's the reason why 1 is 9541 dy = line_bottom_y (&it) - y0;
9542 added below. */
9543 dy = 1 + it.current_y - y0;
9544 9542
9545 if (dy > scroll_max) 9543 if (dy > scroll_max)
9546 return SCROLLING_FAILED; 9544 return SCROLLING_FAILED;