diff --git a/src/keyboard.c b/src/keyboard.c index bb411e77823..65938a5eb56 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -10790,11 +10790,19 @@ The `posn-' functions access elements of such lists. */) { Lisp_Object x = XCAR (tem); Lisp_Object y = XCAR (XCDR (tem)); + Lisp_Object aux_info = XCDR (XCDR (tem)); + int y_coord = XINT (y); /* Point invisible due to hscrolling? X can be -1 when a newline in a R2L line overflows into the left fringe. */ if (XINT (x) < -1) return Qnil; + if (!NILP (aux_info) && y_coord < 0) + { + int rtop = XINT (XCAR (aux_info)); + + y = make_number (y_coord + rtop); + } tem = Fposn_at_x_y (x, y, window, Qnil); }