changeset 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 55791d77fcb3
children 083f558fe283
files src/xdisp.c
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
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);