# HG changeset patch # User Kenichi Handa # Date 1146830191 0 # Node ID fd520a2e66adc18be0637b16ac5b906c27154251 # Parent 55791d77fcb3e03052f4e80609ae751d3bf9c442 (handle_composition_prop): Fix for the case of empty composition component. diff -r 55791d77fcb3 -r fd520a2e66ad src/xdisp.c --- 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);