]> git.eshelyaron.com Git - emacs.git/commitdiff
xfns.c (Fx_show_tip): Subtract last glyph's width only when it is for padding.
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Sat, 10 Apr 2010 10:59:46 +0000 (19:59 +0900)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Sat, 10 Apr 2010 10:59:46 +0000 (19:59 +0900)
src/ChangeLog
src/xfns.c

index 157ff6db67333f88a46e46e580da1dd98d341a42..c7ea82af2a850f915cdcee0c07e541639167a150 100644 (file)
@@ -9,7 +9,8 @@
        TRY_WINDOW_CHECK_MARGINS.
 
        * xfns.c (Fx_show_tip): Undo last change.  Call try_window with
-       TRY_WINDOW_IGNORE_FONTS_CHANGE (Bug#2423).
+       TRY_WINDOW_IGNORE_FONTS_CHANGE (Bug#2423).  Subtract last glyph's
+       width only when it is for padding.
 
 2010-04-09  Jan Djärv  <jan.h.d@swipnet.se>
 
index 52d6b7bd00fbd2240699760e94976966c1b0c39c..e02174e55fa25726732f9b9f0de45861a9e7e63a 100644 (file)
@@ -5245,15 +5245,15 @@ Text larger than the specified size is clipped.  */)
       /* Let the row go over the full width of the frame.  */
       row->full_width_p = 1;
 
+      row_width = row->pixel_width;
       /* There's a glyph at the end of rows that is used to place
         the cursor there.  Don't include the width of this glyph.  */
       if (row->used[TEXT_AREA])
        {
          last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1];
-         row_width = row->pixel_width - last->pixel_width;
+         if (INTEGERP (last->object))
+           row_width -= last->pixel_width;
        }
-      else
-       row_width = row->pixel_width;
 
       height += row->height;
       width = max (width, row_width);