diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 3c78296aa70..fdb5ef669a5 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -8594,7 +8594,7 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, | |||
| 8594 | int this_scroll_margin; | 8594 | int this_scroll_margin; |
| 8595 | int dy = 0; | 8595 | int dy = 0; |
| 8596 | int scroll_max; | 8596 | int scroll_max; |
| 8597 | int line_height, rc; | 8597 | int rc; |
| 8598 | int amount_to_scroll = 0; | 8598 | int amount_to_scroll = 0; |
| 8599 | Lisp_Object aggressive; | 8599 | Lisp_Object aggressive; |
| 8600 | int height; | 8600 | int height; |
| @@ -8649,6 +8649,9 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, | |||
| 8649 | if (PT >= CHARPOS (scroll_margin_pos)) | 8649 | if (PT >= CHARPOS (scroll_margin_pos)) |
| 8650 | { | 8650 | { |
| 8651 | int y0; | 8651 | int y0; |
| 8652 | #if 0 | ||
| 8653 | int line_height; | ||
| 8654 | #endif | ||
| 8652 | 8655 | ||
| 8653 | /* Point is in the scroll margin at the bottom of the window, or | 8656 | /* Point is in the scroll margin at the bottom of the window, or |
| 8654 | below. Compute a new window start that makes point visible. */ | 8657 | below. Compute a new window start that makes point visible. */ |
| @@ -8659,10 +8662,14 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, | |||
| 8659 | y0 = it.current_y; | 8662 | y0 = it.current_y; |
| 8660 | move_it_to (&it, PT, 0, it.last_visible_y, -1, | 8663 | move_it_to (&it, PT, 0, it.last_visible_y, -1, |
| 8661 | MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); | 8664 | MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); |
| 8665 | #if 0 /* Taking the line's height into account here looks wrong. */ | ||
| 8662 | line_height = (it.max_ascent + it.max_descent | 8666 | line_height = (it.max_ascent + it.max_descent |
| 8663 | ? it.max_ascent + it.max_descent | 8667 | ? it.max_ascent + it.max_descent |
| 8664 | : last_height); | 8668 | : last_height); |
| 8665 | dy = it.current_y + line_height - y0; | 8669 | dy = it.current_y + line_height - y0; |
| 8670 | #else | ||
| 8671 | dy = it.current_y - y0; | ||
| 8672 | #endif | ||
| 8666 | 8673 | ||
| 8667 | if (dy > scroll_max) | 8674 | if (dy > scroll_max) |
| 8668 | return 0; | 8675 | return 0; |