Fix bug #18839 with incorrect image size returned by posn-at-point.

src/dispnew.c (buffer_posn_from_coords): Use
 WINDOW_WANTS_HEADER_LINE_P, not WINDOW_WANTS_MODELINE_P, to
 account for the header-line height.
This commit is contained in:
Eli Zaretskii 2014-10-26 17:42:08 +02:00
parent 73fd041d91
commit 475e766a94
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2014-10-26 Eli Zaretskii <eliz@gnu.org>
* dispnew.c (buffer_posn_from_coords): Use
WINDOW_WANTS_HEADER_LINE_P, not WINDOW_WANTS_MODELINE_P, to
account for the header-line height. (Bug#18839)
2014-10-22 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* xdisp.c (draw_glyphs): Set clipping to highlight boundaries.

View file

@ -5191,7 +5191,7 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p
start position, i.e. it excludes the header-line row, but
MATRIX_ROW includes the header-line row. Adjust for a possible
header-line row. */
it_vpos = it.vpos + WINDOW_WANTS_MODELINE_P (w);
it_vpos = it.vpos + WINDOW_WANTS_HEADER_LINE_P (w);
if (it_vpos < w->current_matrix->nrows
&& (row = MATRIX_ROW (w->current_matrix, it_vpos),
row->enabled_p))