From: Kenichi Handa Date: Fri, 5 May 2006 11:56:31 +0000 (+0000) Subject: (handle_composition_prop): Fix for the case of empty X-Git-Tag: emacs-pretest-22.0.90~2800 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ba1eeafade86f2f03c7e524ce730b733a56f48e4;p=emacs.git (handle_composition_prop): Fix for the case of empty composition component. --- diff --git a/src/xdisp.c b/src/xdisp.c index ecc097343f2..984980324b0 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -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);