# HG changeset patch # User Kenichi Handa # Date 960253699 0 # Node ID 348aa1a6a06269dd3ca9a91126071c44e17f0bcb # Parent 420c1b718335e75682a7cb2fc343dff3d40b4d54 (encode_terminal_code): Change the way to check if terminal coding does any conversion. (append_glyph): Set glyph->pixel_width correctly. diff -r 420c1b718335 -r 348aa1a6a062 src/term.c --- a/src/term.c Mon Jun 05 19:24:26 2000 +0000 +++ b/src/term.c Tue Jun 06 01:08:19 2000 +0000 @@ -954,7 +954,10 @@ int result; struct coding_system *coding; - coding = (CODING_REQUIRE_ENCODING (&terminal_coding) + /* If terminal_coding does any conversion, use it, otherwise use + safe_terminal_coding. We can't use CODING_REQUIRE_ENCODING here + because it always return 1 if the member src_multibyte is 1. */ + coding = (terminal_coding.common_flags & CODING_REQUIRE_ENCODING_MASK ? &terminal_coding : &safe_terminal_coding); @@ -1780,7 +1783,7 @@ ++i) { glyph->type = CHAR_GLYPH; - glyph->pixel_width = 1; + glyph->pixel_width = it->pixel_width; glyph->u.ch = it->c; glyph->face_id = it->face_id; glyph->padding_p = i > 0;