]> git.eshelyaron.com Git - emacs.git/commitdiff
(handle_composition_prop): Fix for the case of empty
authorKenichi Handa <handa@m17n.org>
Fri, 5 May 2006 11:56:31 +0000 (11:56 +0000)
committerKenichi Handa <handa@m17n.org>
Fri, 5 May 2006 11:56:31 +0000 (11:56 +0000)
composition component.

src/xdisp.c

index ecc097343f2720f986309f8b93fcf6725d2d85f3..984980324b0749690aac1e09faa0e61623569693 100644 (file)
@@ -4447,6 +4447,24 @@ handle_composition_prop (it)
 
       if (id >= 0)
        {
+         struct composition *cmp = composition_table[id];
+
+         if (cmp->glyph_len == 0)
+           {
+             /* No glyph.  */
+             if (STRINGP (it->string))
+               {
+                 IT_STRING_CHARPOS (*it) = end;
+                 IT_STRING_BYTEPOS (*it) = string_char_to_byte (it->string,
+                                                                end);
+               }
+             else
+               {
+                 IT_CHARPOS (*it) = end;
+                 IT_BYTEPOS (*it) = CHAR_TO_BYTE (end);
+               }
+             return HANDLED_RECOMPUTE_PROPS;
+           }
          it->method = GET_FROM_COMPOSITION;
          it->cmp_id = id;
          it->cmp_len = COMPOSITION_LENGTH (prop);