(glyph_rect): Return 0 if position is outside text area.
This commit is contained in:
parent
31ab1f0585
commit
f0ad2f4c89
1 changed files with 5 additions and 1 deletions
|
@ -3647,8 +3647,9 @@ glyph_rect (f, x, y, rect)
|
|||
Lisp_Object window;
|
||||
struct window *w;
|
||||
struct glyph_row *r, *end_row;
|
||||
enum window_part part;
|
||||
|
||||
window = window_from_coordinates (f, x, y, 0, &x, &y, 0);
|
||||
window = window_from_coordinates (f, x, y, &part, &x, &y, 0);
|
||||
if (NILP (window))
|
||||
return 0;
|
||||
|
||||
|
@ -3656,6 +3657,9 @@ glyph_rect (f, x, y, rect)
|
|||
r = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
|
||||
end_row = r + w->current_matrix->nrows - 1;
|
||||
|
||||
if (part != ON_TEXT)
|
||||
return 0;
|
||||
|
||||
for (; r < end_row && r->enabled_p; ++r)
|
||||
{
|
||||
if (r->y >= y)
|
||||
|
|
Loading…
Add table
Reference in a new issue