diff options
| author | Gerd Moellmann | 2001-02-05 13:02:51 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-02-05 13:02:51 +0000 |
| commit | e89aaabdcb8f815c65ac67987670e054088c701d (patch) | |
| tree | 11550933daa96ffb07a711e1e65b9e69c625cba6 /src | |
| parent | e16f52ce8fd76890b67c1cc43b99d7b70d15b2b0 (diff) | |
| download | emacs-e89aaabdcb8f815c65ac67987670e054088c701d.tar.gz emacs-e89aaabdcb8f815c65ac67987670e054088c701d.zip | |
(try_scrolling): If point is in the line below the
window, make sure to move the iterator at least a canonical
char height down.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/xdisp.c | 16 |
2 files changed, 8 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 385a98fe1be..f43f38997cb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2001-02-05 Gerd Moellmann <gerd@gnu.org> | 1 | 2001-02-05 Gerd Moellmann <gerd@gnu.org> |
| 2 | 2 | ||
| 3 | * xdisp.c (try_scrolling): If point is in the line below the | ||
| 4 | window, make sure to move the iterator at least a canonical | ||
| 5 | char height down. | ||
| 6 | |||
| 3 | * window.c (Fmove_to_window_line): Don't add 1 if window is | 7 | * window.c (Fmove_to_window_line): Don't add 1 if window is |
| 4 | vscrolled. | 8 | vscrolled. |
| 5 | 9 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index eaaff196079..94e3f41b14c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -9005,9 +9005,6 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, | |||
| 9005 | if (PT >= CHARPOS (scroll_margin_pos)) | 9005 | if (PT >= CHARPOS (scroll_margin_pos)) |
| 9006 | { | 9006 | { |
| 9007 | int y0; | 9007 | int y0; |
| 9008 | #if 0 | ||
| 9009 | int line_height; | ||
| 9010 | #endif | ||
| 9011 | 9008 | ||
| 9012 | /* Point is in the scroll margin at the bottom of the window, or | 9009 | /* Point is in the scroll margin at the bottom of the window, or |
| 9013 | below. Compute a new window start that makes point visible. */ | 9010 | below. Compute a new window start that makes point visible. */ |
| @@ -9018,19 +9015,13 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, | |||
| 9018 | y0 = it.current_y; | 9015 | y0 = it.current_y; |
| 9019 | move_it_to (&it, PT, 0, it.last_visible_y, -1, | 9016 | move_it_to (&it, PT, 0, it.last_visible_y, -1, |
| 9020 | MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); | 9017 | MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); |
| 9021 | #if 0 /* Taking the line's height into account here looks wrong. */ | 9018 | |
| 9022 | line_height = (it.max_ascent + it.max_descent | ||
| 9023 | ? it.max_ascent + it.max_descent | ||
| 9024 | : last_height); | ||
| 9025 | dy = it.current_y + line_height - y0; | ||
| 9026 | #else | ||
| 9027 | /* With a scroll_margin of 0, scroll_margin_pos is at the window | 9019 | /* With a scroll_margin of 0, scroll_margin_pos is at the window |
| 9028 | end, which is one line below the window. The iterator's | 9020 | end, which is one line below the window. The iterator's |
| 9029 | current_y will be same as y0 in that case, but we have to | 9021 | current_y will be same as y0 in that case, but we have to |
| 9030 | scroll a line to make PT visible. That's the reason why 1 is | 9022 | scroll a line to make PT visible. That's the reason why 1 is |
| 9031 | added below. */ | 9023 | added below. */ |
| 9032 | dy = 1 + it.current_y - y0; | 9024 | dy = 1 + it.current_y - y0; |
| 9033 | #endif | ||
| 9034 | 9025 | ||
| 9035 | if (dy > scroll_max) | 9026 | if (dy > scroll_max) |
| 9036 | return 0; | 9027 | return 0; |
| @@ -9041,8 +9032,9 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, | |||
| 9041 | start_display (&it, w, startp); | 9032 | start_display (&it, w, startp); |
| 9042 | 9033 | ||
| 9043 | if (scroll_conservatively) | 9034 | if (scroll_conservatively) |
| 9044 | amount_to_scroll = | 9035 | amount_to_scroll |
| 9045 | max (dy, CANON_Y_UNIT (f) * max (scroll_step, temp_scroll_step)); | 9036 | = max (max (dy, CANON_Y_UNIT (f)), |
| 9037 | CANON_Y_UNIT (f) * max (scroll_step, temp_scroll_step)); | ||
| 9046 | else if (scroll_step || temp_scroll_step) | 9038 | else if (scroll_step || temp_scroll_step) |
| 9047 | amount_to_scroll = scroll_max; | 9039 | amount_to_scroll = scroll_max; |
| 9048 | else | 9040 | else |