From: Kenichi Handa Date: Mon, 30 Mar 1998 06:00:54 +0000 (+0000) Subject: (Finsert_file_contents): Call adjust_after_insert when X-Git-Tag: emacs-20.3~1755 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=12fccb8562771042b49373c30782297caf2f4eb4;p=emacs.git (Finsert_file_contents): Call adjust_after_insert when a text is inserted in a multibyte buffer without any code conversion. --- diff --git a/src/fileio.c b/src/fileio.c index 677bb9be7a8..fbb6e64f2d1 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3793,19 +3793,11 @@ This does code conversion according to the value of\n\ /* There's a possibility that we must combine bytes at the head (resp. the tail) of the just inserted text with the bytes before (resp. after) the gap to form a single - character. Thus, we, at first, rewind the adjusted - character positions (GPT, ZV, Z), then adjust them again. */ - GAP_SIZE += inserted; - GPT_BYTE -= inserted; - ZV_BYTE -= inserted; - Z_BYTE -= inserted; - GPT -= inserted; - ZV -= inserted; - Z -= inserted; - - inserted = multibyte_chars_in_text (GPT_ADDR, inserted); - adjust_after_replace (PT, PT_BYTE, PT, PT_BYTE, - inserted, inserted_byte, 0); + character. */ + inserted = multibyte_chars_in_text (GPT_ADDR - inserted, inserted); + adjust_after_insert (PT, PT_BYTE, + PT + inserted_byte, PT_BYTE + inserted_byte, + inserted); } #ifdef DOS_NT