changeset 21308:6d8fff47f6a0

(code_convert_region): Call adjust_before_replace in the no-conversion case. Adjust GPT, ZV and Z in chars.
author Richard M. Stallman <rms@gnu.org>
date Sat, 28 Mar 1998 21:55:22 +0000
parents 9ac5045a93ce
children dfa28803a4aa
files src/coding.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/coding.c	Sat Mar 28 21:52:10 1998 +0000
+++ b/src/coding.c	Sat Mar 28 21:55:22 1998 +0000
@@ -4009,6 +4009,8 @@
       coding->produced = len_byte;
       if (multibyte)
 	{
+	  adjust_before_replace (from, from_byte, to, to_byte);
+
 	  /* We still may have to combine byte at the head and the
              tail of the text in the region.  */
 	  if (GPT != to)
@@ -4019,9 +4021,9 @@
 	  GPT_BYTE -= len_byte;
 	  ZV_BYTE -= len_byte;
 	  Z_BYTE -= len_byte;
-	  GPT -= len_byte;
-	  ZV -= len_byte;
-	  Z -= len_byte;
+	  GPT -= len;
+	  ZV -= len;
+	  Z -= len;
 	  adjust_after_replace (from, from_byte, to, to_byte,
 				coding->produced_char, len_byte, replace);
 	}