diff src/xdisp.c @ 70395:fd520a2e66ad

(handle_composition_prop): Fix for the case of empty composition component.
author Kenichi Handa <handa@m17n.org>
date Fri, 05 May 2006 11:56:31 +0000
parents 91d5409c3df8
children e11c9bf81843 1321f6cfb389 146cd8369025
line wrap: on
line diff
--- a/src/xdisp.c	Fri May 05 11:56:08 2006 +0000
+++ b/src/xdisp.c	Fri May 05 11:56:31 2006 +0000
@@ -4447,6 +4447,24 @@
 
       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);