changeset 110019:dd01a03cf509

composite.c (composition_update_it): Fix computing of cmp_it->width.
author Kenichi Handa <handa@m17n.org>
date Mon, 30 Aug 2010 09:32:29 +0900
parents aa172fa85851
children e42c7e9e39ad c1792addf7ea
files src/ChangeLog src/composite.c
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Aug 30 09:15:54 2010 +0900
+++ b/src/ChangeLog	Mon Aug 30 09:32:29 2010 +0900
@@ -1,3 +1,8 @@
+2010-08-30  Kenichi Handa  <handa@m17n.org>
+
+	* composite.c (composition_update_it): Fix computing of
+	cmp_it->width.
+
 2010-08-29  Jan Djärv  <jan.h.d@swipnet.se>
 
 	* nsterm.m (ns_draw_window_cursor): Draw BAR_CURSOR correct for R2L.
--- a/src/composite.c	Mon Aug 30 09:15:54 2010 +0900
+++ b/src/composite.c	Mon Aug 30 09:32:29 2010 +0900
@@ -1440,8 +1440,7 @@
 	{
 	  c = XINT (LGSTRING_CHAR (gstring, i));
 	  cmp_it->nbytes += CHAR_BYTES (c);
-	  cmp_it->width = (LGLYPH_WIDTH (glyph) > 0
-			   ? CHAR_WIDTH (LGLYPH_CHAR (glyph)) : 0);
+	  cmp_it->width += LGLYPH_WIDTH (glyph) > 0 ? CHAR_WIDTH (c) : 0;
 	}
     }
   return c;