diff options
| author | Eli Zaretskii | 2010-06-19 14:57:19 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2010-06-19 14:57:19 +0300 |
| commit | d4aaac0f37d3e6e386c826575be8294a7dd4d2a3 (patch) | |
| tree | de0c4ea88e9e1c32d263ef788efed8d98599de54 | |
| parent | ad5a12b51bc0a1bb4acf219d860a6cbbadb61b8a (diff) | |
| download | emacs-d4aaac0f37d3e6e386c826575be8294a7dd4d2a3.tar.gz emacs-d4aaac0f37d3e6e386c826575be8294a7dd4d2a3.zip | |
xdisp.c (try_scrolling): Fix last change.
| -rw-r--r-- | src/xdisp.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index c111ca2ffa3..d533346c3b6 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -13436,14 +13436,17 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, | |||
| 13436 | the user limited scrolling by a small number of lines, but | 13436 | the user limited scrolling by a small number of lines, but |
| 13437 | always finds PT if scroll_conservatively is set to a large | 13437 | always finds PT if scroll_conservatively is set to a large |
| 13438 | number, such as most-positive-fixnum. */ | 13438 | number, such as most-positive-fixnum. */ |
| 13439 | int slack = min (scroll_max, 10 * FRAME_LINE_HEIGHT (f)); | 13439 | int slack = max (scroll_max, 10 * FRAME_LINE_HEIGHT (f)); |
| 13440 | int y_to_move = | ||
| 13441 | slack >= INT_MAX - it.last_visible_y | ||
| 13442 | ? INT_MAX | ||
| 13443 | : it.last_visible_y + slack; | ||
| 13440 | 13444 | ||
| 13441 | /* Compute the distance from the scroll margin to PT or to | 13445 | /* Compute the distance from the scroll margin to PT or to |
| 13442 | the scroll limit, whichever comes first. This should | 13446 | the scroll limit, whichever comes first. This should |
| 13443 | include the height of the cursor line, to make that line | 13447 | include the height of the cursor line, to make that line |
| 13444 | fully visible. */ | 13448 | fully visible. */ |
| 13445 | move_it_to (&it, PT, -1, | 13449 | move_it_to (&it, PT, -1, y_to_move, |
| 13446 | it.last_visible_y + slack, | ||
| 13447 | -1, MOVE_TO_POS | MOVE_TO_Y); | 13450 | -1, MOVE_TO_POS | MOVE_TO_Y); |
| 13448 | dy = line_bottom_y (&it) - y0; | 13451 | dy = line_bottom_y (&it) - y0; |
| 13449 | 13452 | ||