Commit 352ec8ff authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Fix bug #4426 with buffer_posn_from_coords when header line is present.

 dispnew.c (buffer_posn_from_coords): Account it.vpos for a possible
 presence of header-line.
parent 8c069cc7
2011-10-08 Eli Zaretskii <>
* dispnew.c (buffer_posn_from_coords): Account for a possible
presence of header-line. (Bug#4426)
2011-10-07 Stefan Monnier <>
* buffer.c (syms_of_buffer) <enable-multibyte-characters>: Don't
......@@ -5261,6 +5261,10 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p
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;
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