aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2006-05-05 11:56:31 +0000
committerKenichi Handa2006-05-05 11:56:31 +0000
commitba1eeafade86f2f03c7e524ce730b733a56f48e4 (patch)
tree1bb195e66dc4a33b262df1e67ca0272306ab5a28 /src
parent37e213259f6656a3a555ca89820c30c35ccab7c7 (diff)
downloademacs-ba1eeafade86f2f03c7e524ce730b733a56f48e4.tar.gz
emacs-ba1eeafade86f2f03c7e524ce730b733a56f48e4.zip
(handle_composition_prop): Fix for the case of empty
composition component.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c18
1 files changed, 18 insertions, 0 deletions
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)
4447 4447
4448 if (id >= 0) 4448 if (id >= 0)
4449 { 4449 {
4450 struct composition *cmp = composition_table[id];
4451
4452 if (cmp->glyph_len == 0)
4453 {
4454 /* No glyph. */
4455 if (STRINGP (it->string))
4456 {
4457 IT_STRING_CHARPOS (*it) = end;
4458 IT_STRING_BYTEPOS (*it) = string_char_to_byte (it->string,
4459 end);
4460 }
4461 else
4462 {
4463 IT_CHARPOS (*it) = end;
4464 IT_BYTEPOS (*it) = CHAR_TO_BYTE (end);
4465 }
4466 return HANDLED_RECOMPUTE_PROPS;
4467 }
4450 it->method = GET_FROM_COMPOSITION; 4468 it->method = GET_FROM_COMPOSITION;
4451 it->cmp_id = id; 4469 it->cmp_id = id;
4452 it->cmp_len = COMPOSITION_LENGTH (prop); 4470 it->cmp_len = COMPOSITION_LENGTH (prop);