]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug #18839 with incorrect image size returned by posn-at-point.
authorEli Zaretskii <eliz@gnu.org>
Sun, 26 Oct 2014 15:42:08 +0000 (17:42 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sun, 26 Oct 2014 15:42:08 +0000 (17:42 +0200)
 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.

src/ChangeLog
src/dispnew.c

index 28af50269286cb85592190a866a7cede74119db2..da3e4d682d557318a1fdf8c2983dd1931e4e4296 100644 (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.
index 713457750453af06b638cc74be5dd4a049c76071..ffd51e08e98dc11b0c04eaf26364d6bffa4ebc5f 100644 (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))