]> git.eshelyaron.com Git - emacs.git/commitdiff
(encode_terminal_code): Change the way to check if
authorKenichi Handa <handa@m17n.org>
Tue, 6 Jun 2000 01:08:19 +0000 (01:08 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 6 Jun 2000 01:08:19 +0000 (01:08 +0000)
terminal coding does any conversion.
(append_glyph): Set glyph->pixel_width correctly.

src/term.c

index 672eee22c6cb42f9089b20dd0c11e1df1a3a131f..d21b78c6b62bd00f779e8883e9540cc95501aa5e 100644 (file)
@@ -954,7 +954,10 @@ encode_terminal_code (src, dst, src_len, dst_len, consumed)
   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 @@ append_glyph (it)
        ++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;