From: Eli Zaretskii Date: Sun, 26 Oct 2014 15:42:08 +0000 (+0200) Subject: Fix bug #18839 with incorrect image size returned by posn-at-point. X-Git-Tag: emacs-24.4.90~312 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=475e766a94eddad2419474aa9c4c38ff278af2f7;p=emacs.git 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. --- diff --git a/src/ChangeLog b/src/ChangeLog index 28af5026928..da3e4d682d5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2014-10-26 Eli Zaretskii + + * 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 * xdisp.c (draw_glyphs): Set clipping to highlight boundaries. diff --git a/src/dispnew.c b/src/dispnew.c index 71345775045..ffd51e08e98 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -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))