diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/term.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/term.c b/src/term.c index 7d9fe8cee30..0858f816851 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -549,13 +549,14 @@ encode_terminal_code (struct glyph *src, int src_len, | |||
| 549 | { | 549 | { |
| 550 | if (src->type == COMPOSITE_GLYPH) | 550 | if (src->type == COMPOSITE_GLYPH) |
| 551 | { | 551 | { |
| 552 | struct composition *cmp UNINIT; | 552 | struct composition *cmp; |
| 553 | Lisp_Object gstring UNINIT; | 553 | Lisp_Object gstring; |
| 554 | int i; | 554 | int i; |
| 555 | 555 | ||
| 556 | nbytes = buf - encode_terminal_src; | 556 | nbytes = buf - encode_terminal_src; |
| 557 | if (src->u.cmp.automatic) | 557 | if (src->u.cmp.automatic) |
| 558 | { | 558 | { |
| 559 | cmp = NULL; | ||
| 559 | gstring = composition_gstring_from_id (src->u.cmp.id); | 560 | gstring = composition_gstring_from_id (src->u.cmp.id); |
| 560 | required = src->slice.cmp.to - src->slice.cmp.from + 1; | 561 | required = src->slice.cmp.to - src->slice.cmp.from + 1; |
| 561 | } | 562 | } |
| @@ -575,7 +576,7 @@ encode_terminal_code (struct glyph *src, int src_len, | |||
| 575 | buf = encode_terminal_src + nbytes; | 576 | buf = encode_terminal_src + nbytes; |
| 576 | } | 577 | } |
| 577 | 578 | ||
| 578 | if (src->u.cmp.automatic) | 579 | if (!cmp) |
| 579 | for (i = src->slice.cmp.from; i <= src->slice.cmp.to; i++) | 580 | for (i = src->slice.cmp.from; i <= src->slice.cmp.to; i++) |
| 580 | { | 581 | { |
| 581 | Lisp_Object g = LGSTRING_GLYPH (gstring, i); | 582 | Lisp_Object g = LGSTRING_GLYPH (gstring, i); |