aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2008-10-27 05:43:17 +0000
committerChong Yidong2008-10-27 05:43:17 +0000
commitb918aa6b5d512ffbdca994d0e60dfabc43fed6c3 (patch)
tree9d99419df92b31f6186274506494ca6ee111d450
parent9f33212acf32ea34e294ac1b23f1ec392b05970b (diff)
downloademacs-b918aa6b5d512ffbdca994d0e60dfabc43fed6c3.tar.gz
emacs-b918aa6b5d512ffbdca994d0e60dfabc43fed6c3.zip
Perform last revert properly. :-(
-rw-r--r--src/xdisp.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index d2b62b1ffe0..b7c05f9eed4 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -12622,7 +12622,7 @@ try_scrolling (window, just_this_one_p, scroll_conservatively,
12622 struct text_pos pos, startp; 12622 struct text_pos pos, startp;
12623 struct it it; 12623 struct it it;
12624 int this_scroll_margin, scroll_max, rc, height; 12624 int this_scroll_margin, scroll_max, rc, height;
12625 int dy = 0, amount_to_scroll = 0; 12625 int dy = 0, amount_to_scroll = 0, scroll_down_p = 0;
12626 int extra_scroll_margin_lines = last_line_misfit ? 1 : 0; 12626 int extra_scroll_margin_lines = last_line_misfit ? 1 : 0;
12627 Lisp_Object aggressive; 12627 Lisp_Object aggressive;
12628 int scroll_limit = INT_MAX / FRAME_LINE_HEIGHT (f); 12628 int scroll_limit = INT_MAX / FRAME_LINE_HEIGHT (f);
@@ -12687,7 +12687,8 @@ try_scrolling (window, just_this_one_p, scroll_conservatively,
12687 window, or below. Compute the distance from the scroll 12687 window, or below. Compute the distance from the scroll
12688 margin to PT, and give up if the distance is greater than 12688 margin to PT, and give up if the distance is greater than
12689 scroll_max. */ 12689 scroll_max. */
12690 move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS); 12690 move_it_to (&it, PT, -1, it.last_visible_y - 1, -1,
12691 MOVE_TO_POS | MOVE_TO_Y);
12691 12692
12692 /* To make point visible, we must move the window start down 12693 /* To make point visible, we must move the window start down
12693 so that the cursor line is visible, which means we have 12694 so that the cursor line is visible, which means we have
@@ -12696,11 +12697,18 @@ try_scrolling (window, just_this_one_p, scroll_conservatively,
12696 12697
12697 if (dy > scroll_max) 12698 if (dy > scroll_max)
12698 return SCROLLING_FAILED; 12699 return SCROLLING_FAILED;
12700
12701 scroll_down_p = 1;
12699 } 12702 }
12700 } 12703 }
12701 12704
12702 if (dy > 0) 12705 if (scroll_down_p)
12703 { 12706 {
12707 /* Move the window start down. If scrolling conservatively,
12708 move it just enough down to make point visible. If
12709 scroll_step is set, move it down by scroll_step. */
12710 start_display (&it, w, startp);
12711
12704 if (scroll_conservatively) 12712 if (scroll_conservatively)
12705 /* Set AMOUNT_TO_SCROLL to at least one line, 12713 /* Set AMOUNT_TO_SCROLL to at least one line,
12706 and at most scroll_conservatively lines. */ 12714 and at most scroll_conservatively lines. */
@@ -12725,14 +12733,10 @@ try_scrolling (window, just_this_one_p, scroll_conservatively,
12725 if (amount_to_scroll <= 0) 12733 if (amount_to_scroll <= 0)
12726 return SCROLLING_FAILED; 12734 return SCROLLING_FAILED;
12727 12735
12728 /* Move the window start down. If scrolling conservatively,
12729 move it just enough down to make point visible. If
12730 scroll_step is set, move it down by scroll_step. */
12731 start_display (&it, w, startp);
12732 move_it_vertically (&it, amount_to_scroll);
12733
12734 /* If moving by amount_to_scroll leaves STARTP unchanged, 12736 /* If moving by amount_to_scroll leaves STARTP unchanged,
12735 move it down one screen line. */ 12737 move it down one screen line. */
12738
12739 move_it_vertically (&it, amount_to_scroll);
12736 if (CHARPOS (it.current.pos) == CHARPOS (startp)) 12740 if (CHARPOS (it.current.pos) == CHARPOS (startp))
12737 move_it_by_lines (&it, 1, 1); 12741 move_it_by_lines (&it, 1, 1);
12738 startp = it.current.pos; 12742 startp = it.current.pos;