diff options
| author | Gerd Moellmann | 2000-08-11 13:01:28 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-08-11 13:01:28 +0000 |
| commit | 440fc13575d5b4a23b1a3ad1fedca1af76f5ff4b (patch) | |
| tree | b7b80a79920a7c07a129565443ead291e0818467 | |
| parent | cf6818892f2e3dabcd649a326b88428440f1b03d (diff) | |
| download | emacs-440fc13575d5b4a23b1a3ad1fedca1af76f5ff4b.tar.gz emacs-440fc13575d5b4a23b1a3ad1fedca1af76f5ff4b.zip | |
(try_cursor_movement): Fix handling of cursor in
partially visible line which is smaller than the window's
height.
| -rw-r--r-- | src/ChangeLog | 11 | ||||
| -rw-r--r-- | src/xdisp.c | 17 |
2 files changed, 24 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index bd188fe670f..5d6e8ba61e1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2000-08-11 Gerd Moellmann <gerd@gnu.org> | ||
| 2 | |||
| 3 | * fns.c (hashfn_eq, hashfn_eql): Don't handle strings specially | ||
| 4 | since they aren't relocated anymore. | ||
| 5 | (sxhash_string): Make sure returned hash code fits in a Lisp | ||
| 6 | integer. | ||
| 7 | |||
| 8 | * xdisp.c (try_cursor_movement): Fix handling of cursor in | ||
| 9 | partially visible line which is smaller than the window's | ||
| 10 | height. | ||
| 11 | |||
| 1 | 2000-08-11 Kenichi Handa <handa@etl.go.jp> | 12 | 2000-08-11 Kenichi Handa <handa@etl.go.jp> |
| 2 | 13 | ||
| 3 | * ccl.c (CCL_READ_CHAR): If source is multibyte, pay attention to | 14 | * ccl.c (CCL_READ_CHAR): If source is multibyte, pay attention to |
diff --git a/src/xdisp.c b/src/xdisp.c index 9a52e1f2a35..c27876623a1 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -8950,14 +8950,23 @@ try_cursor_movement (window, startp, scroll_step) | |||
| 8950 | /* if PT is not in the glyph row, give up. */ | 8950 | /* if PT is not in the glyph row, give up. */ |
| 8951 | rc = -1; | 8951 | rc = -1; |
| 8952 | } | 8952 | } |
| 8953 | else if (MATRIX_ROW_PARTIALLY_VISIBLE_P (row) | 8953 | else if (MATRIX_ROW_PARTIALLY_VISIBLE_P (row)) |
| 8954 | && window_box_height (w) > row->height) | ||
| 8955 | { | 8954 | { |
| 8956 | /* If we end up in a partially visible line, let's make it | 8955 | /* If we end up in a partially visible line, let's make it |
| 8957 | fully visible, except when it's taller than the window, | 8956 | fully visible, except when it's taller than the window, |
| 8958 | in which case we can't do much about it. */ | 8957 | in which case we can't do much about it. */ |
| 8959 | *scroll_step = 1; | 8958 | if (row->height > window_box_height (w)) |
| 8960 | rc = -1; | 8959 | { |
| 8960 | *scroll_step = 1; | ||
| 8961 | rc = -1; | ||
| 8962 | } | ||
| 8963 | else | ||
| 8964 | { | ||
| 8965 | set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); | ||
| 8966 | try_window (window, startp); | ||
| 8967 | make_cursor_line_fully_visible (w); | ||
| 8968 | rc = 1; | ||
| 8969 | } | ||
| 8961 | } | 8970 | } |
| 8962 | else if (scroll_p) | 8971 | else if (scroll_p) |
| 8963 | rc = -1; | 8972 | rc = -1; |