diff options
| author | Gerd Moellmann | 2000-04-28 13:39:21 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-04-28 13:39:21 +0000 |
| commit | a943a5ca3e381ab60160391ce10d3ccf4c0399c6 (patch) | |
| tree | 931b63e005a55888448cf078a241e3850a151cbf /src | |
| parent | 0badc114185c4f1c84763fe6f0830f061898c34d (diff) | |
| download | emacs-a943a5ca3e381ab60160391ce10d3ccf4c0399c6.tar.gz emacs-a943a5ca3e381ab60160391ce10d3ccf4c0399c6.zip | |
(make_cursor_line_fully_visible): Handle case of rows
taller than the window.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xdisp.c | 21 |
2 files changed, 17 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 79798d69bcf..ecd00d15bed 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2000-04-28 Gerd Moellmann <gerd@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (make_cursor_line_fully_visible): Handle case of rows | ||
| 4 | taller than the window. | ||
| 5 | |||
| 1 | 2000-04-28 Kenichi Handa <handa@etl.go.jp> | 6 | 2000-04-28 Kenichi Handa <handa@etl.go.jp> |
| 2 | 7 | ||
| 3 | * xfaces.c (realize_x_face): Fix the argument of the second | 8 | * xfaces.c (realize_x_face): Fix the argument of the second |
diff --git a/src/xdisp.c b/src/xdisp.c index 0789230f010..2f766bf46e8 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -8148,21 +8148,24 @@ make_cursor_line_fully_visible (w) | |||
| 8148 | matrix = w->desired_matrix; | 8148 | matrix = w->desired_matrix; |
| 8149 | row = MATRIX_ROW (matrix, w->cursor.vpos); | 8149 | row = MATRIX_ROW (matrix, w->cursor.vpos); |
| 8150 | 8150 | ||
| 8151 | /* If row->y == top y of window display area, the window isn't tall | 8151 | if (MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (w, row) |
| 8152 | enough to display a single line. There is nothing we can do | 8152 | /* The row may be partially visible at the top because we |
| 8153 | about it. */ | 8153 | already have chosen a vscroll to align the bottom of the |
| 8154 | header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w); | 8154 | row with the bottom of the window. This happens for rows |
| 8155 | if (row->y == header_line_height) | 8155 | taller than the window. */ |
| 8156 | return; | 8156 | && row->y + row->height < window_box_height (w)) |
| 8157 | |||
| 8158 | if (MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (w, row)) | ||
| 8159 | { | 8157 | { |
| 8160 | int dy = row->height - row->visible_height; | 8158 | int dy = row->height - row->visible_height; |
| 8161 | w->vscroll = 0; | 8159 | w->vscroll = 0; |
| 8162 | w->cursor.y += dy; | 8160 | w->cursor.y += dy; |
| 8163 | shift_glyph_matrix (w, matrix, 0, matrix->nrows, dy); | 8161 | shift_glyph_matrix (w, matrix, 0, matrix->nrows, dy); |
| 8164 | } | 8162 | } |
| 8165 | else if (MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P (w, row)) | 8163 | else if (MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P (w, row) |
| 8164 | /* The row may be partially visible at the bottom because | ||
| 8165 | we chose a vscroll to align the row's top with the | ||
| 8166 | window's top. This happens for rows taller than the | ||
| 8167 | window. */ | ||
| 8168 | && row->y > WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w)) | ||
| 8166 | { | 8169 | { |
| 8167 | int dy = - (row->height - row->visible_height); | 8170 | int dy = - (row->height - row->visible_height); |
| 8168 | w->vscroll = dy; | 8171 | w->vscroll = dy; |