comparison src/dispnew.c @ 39254:73dd40615520

(set_window_cursor_after_update): Fix code finding glyph row containing cursor when cursor_in_echo_area is >= 0.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 12 Sep 2001 11:43:47 +0000
parents d86fe98ee7d5
children b74c165ef22f
comparison
equal deleted inserted replaced
39253:81d50e5eaf23 39254:73dd40615520
4538 struct glyph_row *row, *last_row; 4538 struct glyph_row *row, *last_row;
4539 struct glyph *glyph; 4539 struct glyph *glyph;
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;
4562 4561
4563 for (glyph = start; glyph < last; ++glyph) 4562 for (glyph = start; glyph < last; ++glyph)