From: Richard M. Stallman Date: Sat, 28 Mar 1998 21:55:22 +0000 (+0000) Subject: (code_convert_region): Call adjust_before_replace X-Git-Tag: emacs-20.3~1766 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f5f9a3da6b1414a452727c60156dc574044a69e5;p=emacs.git (code_convert_region): Call adjust_before_replace in the no-conversion case. Adjust GPT, ZV and Z in chars. --- diff --git a/src/coding.c b/src/coding.c index 0b71e91c4db..aa68631d4e1 100644 --- a/src/coding.c +++ b/src/coding.c @@ -4009,6 +4009,8 @@ code_convert_region (from, from_byte, to, to_byte, coding, encodep, replace) 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 @@ code_convert_region (from, from_byte, to, to_byte, coding, encodep, replace) 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); }