diff src/term.c @ 29448:348aa1a6a062

(encode_terminal_code): Change the way to check if terminal coding does any conversion. (append_glyph): Set glyph->pixel_width correctly.
author Kenichi Handa <handa@m17n.org>
date Tue, 06 Jun 2000 01:08:19 +0000
parents 167d236e633b
children 3306af2e4f3d
line wrap: on
line diff
--- 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;