diff options
| author | Gerd Moellmann | 2001-09-12 11:43:47 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-09-12 11:43:47 +0000 |
| commit | 6206f8ce21442d8003ecb68b930d908bc690a7f4 (patch) | |
| tree | 79123cfec650ae29c10b423a37cdbaa809aa7c9b /src | |
| parent | cfcda0ba4a66d5f557005a3653735d15f3466df3 (diff) | |
| download | emacs-6206f8ce21442d8003ecb68b930d908bc690a7f4.tar.gz emacs-6206f8ce21442d8003ecb68b930d908bc690a7f4.zip | |
(set_window_cursor_after_update): Fix code
finding glyph row containing cursor when cursor_in_echo_area
is >= 0.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispnew.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index 78d3748c259..abc41ad2a27 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -4540,22 +4540,21 @@ set_window_cursor_after_update (w) | |||
| 4540 | int yb = window_text_bottom_y (w); | 4540 | int yb = window_text_bottom_y (w); |
| 4541 | 4541 | ||
| 4542 | last_row = NULL; | 4542 | last_row = NULL; |
| 4543 | for (row = MATRIX_ROW (w->current_matrix, 0); | 4543 | row = w->current_matrix->rows; |
| 4544 | row->enabled_p; | 4544 | while (row->enabled_p |
| 4545 | ++row) | 4545 | && (last_row == NULL |
| 4546 | || MATRIX_ROW_BOTTOM_Y (row) <= yb)) | ||
| 4546 | { | 4547 | { |
| 4547 | if (row->used[TEXT_AREA] | 4548 | if (row->used[TEXT_AREA] |
| 4548 | && row->glyphs[TEXT_AREA][0].charpos >= 0) | 4549 | && row->glyphs[TEXT_AREA][0].charpos >= 0) |
| 4549 | last_row = row; | 4550 | last_row = row; |
| 4550 | 4551 | ++row; | |
| 4551 | if (MATRIX_ROW_BOTTOM_Y (row) >= yb) | ||
| 4552 | break; | ||
| 4553 | } | 4552 | } |
| 4554 | 4553 | ||
| 4555 | if (last_row) | 4554 | if (last_row) |
| 4556 | { | 4555 | { |
| 4557 | struct glyph *start = row->glyphs[TEXT_AREA]; | 4556 | struct glyph *start = last_row->glyphs[TEXT_AREA]; |
| 4558 | struct glyph *last = start + row->used[TEXT_AREA] - 1; | 4557 | struct glyph *last = start + last_row->used[TEXT_AREA] - 1; |
| 4559 | 4558 | ||
| 4560 | while (last > start && last->charpos < 0) | 4559 | while (last > start && last->charpos < 0) |
| 4561 | --last; | 4560 | --last; |