]> code.delx.au - gnu-emacs/commitdiff
(copy_text): When copying from multibyte to unibyte, do
authorKenichi Handa <handa@m17n.org>
Wed, 4 Feb 1998 11:23:28 +0000 (11:23 +0000)
committerKenichi Handa <handa@m17n.org>
Wed, 4 Feb 1998 11:23:28 +0000 (11:23 +0000)
not alter ASCII characters.

src/insdel.c

index aaf5de38217cfbdac3aca9b9111c4d3e884da621..805200aae567e441390a7e9e2a065e7344faf216 100644 (file)
@@ -574,7 +574,7 @@ copy_text (from_addr, to_addr, nbytes,
        {
          int thislen, c;
          c = STRING_CHAR_AND_LENGTH (from_addr, bytes_left, thislen);
-         *to_addr++ = (c & 0177) + 0200;
+         *to_addr++ = SINGLE_BYTE_CHAR_P (c) ? c : (c & 0177) + 0200;
          from_addr += thislen;
          bytes_left--;
          nchars++;