aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c15
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;