summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2010-04-10 19:59:46 +0900
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2010-04-10 19:59:46 +0900
commit5b253e9c5c158330d6df05f56359cf4a98cf3115 (patch)
treea41e968fbbd3bf45408e85e44f091aac41f2ba80 /src
parent6eff5c3dcd268cbc740ad9b89112203aad2a9756 (diff)
downloademacs-5b253e9c5c158330d6df05f56359cf4a98cf3115.tar.gz
xfns.c (Fx_show_tip): Subtract last glyph's width only when it is for padding.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/xfns.c6
2 files changed, 5 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 157ff6db673..c7ea82af2a8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -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>
diff --git a/src/xfns.c b/src/xfns.c
index 52d6b7bd00f..e02174e55fa 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -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);