Commit f0ad2f4c authored by Kim F. Storm's avatar Kim F. Storm
Browse files

(glyph_rect): Return 0 if position is outside text area.

parent 31ab1f05
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment