]> git.eshelyaron.com Git - emacs.git/commitdiff
xdisp.c (CHAR_COMPOSED_P): New arg END_CHARPOS. Callers changed.
authorKenichi Handa <handa@m17n.org>
Fri, 15 Jan 2010 05:09:50 +0000 (14:09 +0900)
committerKenichi Handa <handa@m17n.org>
Fri, 15 Jan 2010 05:09:50 +0000 (14:09 +0900)
src/ChangeLog
src/xdisp.c

index e18591b345b4ba2ef6b27742db765425470d6b16..91db3a3dbae412c200a14d2e969c138ea5172ea8 100644 (file)
@@ -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-14  Kenichi Handa  <handa@m17n.org>
 
        * coding.c (detect_coding_iso_2022): Fix handling of euc-xx coding
index b20061b6b3b6d1fef252f5baeb72b6a856e3850b..ef9c7453d75639018c1c9072d3232f4e91f28e8b 100644 (file)
@@ -5638,11 +5638,11 @@ static int (* get_next_element[NUM_IT_METHODS]) P_ ((struct it *it)) =
 /* 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 @@ next_element_from_string (it)
          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 @@ next_element_from_string (it)
          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 @@ next_element_from_buffer (it)
          && 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;