Mercurial > emacs
changeset 21319:4f8b7860819e
(Finsert_file_contents): Call adjust_after_insert when
a text is inserted in a multibyte buffer without any code
conversion.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 30 Mar 1998 06:00:54 +0000 |
parents | dd41afae56a4 |
children | 278c256defc6 |
files | src/fileio.c |
diffstat | 1 files changed, 5 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fileio.c Mon Mar 30 05:20:39 1998 +0000 +++ b/src/fileio.c Mon Mar 30 06:00:54 1998 +0000 @@ -3793,19 +3793,11 @@ /* 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