changeset 106851:fd03fa91837d

xdisp.c (CHAR_COMPOSED_P): New arg END_CHARPOS. Callers changed.
author Kenichi Handa <handa@m17n.org>
date Fri, 15 Jan 2010 14:14:00 +0900
parents 49daa9e9669f (current diff) a6629254b6ba (diff)
children a12fbed3d106 2643225473f7
files
diffstat 2 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu Jan 14 19:59:04 2010 -0800
+++ b/src/ChangeLog	Fri Jan 15 14:14:00 2010 +0900
@@ -1,3 +1,7 @@
+2010-01-15  Kenichi Handa  <handa@m17n.org>
+
+	* xdisp.c (CHAR_COMPOSED_P): New arg END_CHARPOS.  Callers changed.
+
 2010-01-15  Chong Yidong  <cyd@stupidchicken.com>
 
 	* nsterm.m (Qnone): Define.
--- a/src/xdisp.c	Thu Jan 14 19:59:04 2010 -0800
+++ b/src/xdisp.c	Fri Jan 15 14:14:00 2010 +0900
@@ -5638,11 +5638,11 @@
 /* Return 1 iff a character at CHARPOS (and BYTEPOS) is composed
    (possibly with the following characters).  */
 
-#define CHAR_COMPOSED_P(IT,CHARPOS,BYTEPOS)				\
+#define CHAR_COMPOSED_P(IT,CHARPOS,BYTEPOS,END_CHARPOS)			\
   ((IT)->cmp_it.id >= 0							\
    || ((IT)->cmp_it.stop_pos == (CHARPOS)				\
        && composition_reseat_it (&(IT)->cmp_it, CHARPOS, BYTEPOS,	\
-				 (IT)->end_charpos, (IT)->w,		\
+				 END_CHARPOS, (IT)->w,			\
 				 FACE_FROM_ID ((IT)->f, (IT)->face_id),	\
 				 (IT)->string)))
 
@@ -6300,7 +6300,7 @@
 	  return 0;
 	}
       else if (CHAR_COMPOSED_P (it, IT_STRING_CHARPOS (*it),
-				IT_STRING_BYTEPOS (*it))
+				IT_STRING_BYTEPOS (*it), SCHARS (it->string))
 	       && next_element_from_composition (it))
 	{
 	  return 1;
@@ -6336,7 +6336,7 @@
 	  CHARPOS (position) = BYTEPOS (position) = -1;
 	}
       else if (CHAR_COMPOSED_P (it, IT_STRING_CHARPOS (*it),
-				IT_STRING_BYTEPOS (*it))
+				IT_STRING_BYTEPOS (*it), it->string_nchars)
 	       && next_element_from_composition (it))
 	{
 	  return 1;
@@ -6523,7 +6523,8 @@
 	  && IT_CHARPOS (*it) >= it->redisplay_end_trigger_charpos)
 	run_redisplay_end_trigger_hook (it);
 
-      if (CHAR_COMPOSED_P (it, IT_CHARPOS (*it), IT_BYTEPOS (*it))
+      if (CHAR_COMPOSED_P (it, IT_CHARPOS (*it), IT_BYTEPOS (*it),
+			   it->end_charpos)
 	  && next_element_from_composition (it))
 	{
 	  return 1;