dispnew.c (buffer_posn_from_coords): Account it.vpos for a possible
presence of header-line.
+2011-10-08 Eli Zaretskii <eliz@gnu.org>
+
+ * dispnew.c (buffer_posn_from_coords): Account for a possible
+ presence of header-line. (Bug#4426)
+
2011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
* buffer.c (syms_of_buffer) <enable-multibyte-characters>: Don't
CHARPOS (startp) = min (ZV, max (BEGV, CHARPOS (startp)));
BYTEPOS (startp) = min (ZV_BYTE, max (BEGV_BYTE, BYTEPOS (startp)));
start_display (&it, w, startp);
+ /* start_display takes into account the header-line row, but IT's
+ vpos still counts from the glyph row that includes the window's
+ start position. Adjust for a possible header-line row. */
+ it.vpos += WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0;
x0 = *x;