src/xdisp.c (redisplay_window): When computing centering_position,
account for the height of the header line.
2011-08-23 Eli Zaretskii <eliz@gnu.org>
+ * xdisp.c (redisplay_window): When computing centering_position,
+ account for the height of the header line. (Bug#8874)
+
* dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
instead of CHAR_TO_BYTE. Fixes a crash when a completion
candidate is selected by the mouse, and that candidate has a
if (pt_offset)
centering_position -= pt_offset;
centering_position -=
- FRAME_LINE_HEIGHT (f) * (1 + margin + (last_line_misfit != 0));
+ FRAME_LINE_HEIGHT (f) * (1 + margin + (last_line_misfit != 0))
+ + WINDOW_HEADER_LINE_HEIGHT (w);
/* Don't let point enter the scroll margin near top of
the window. */
if (centering_position < margin * FRAME_LINE_HEIGHT (f))