# HG changeset patch # User Kenichi Handa # Date 891237654 0 # Node ID 4f8b7860819efb1905344e67ab03f838a1561b40 # Parent dd41afae56a4f20e8f320e3ff9d6b46d70f1d122 (Finsert_file_contents): Call adjust_after_insert when a text is inserted in a multibyte buffer without any code conversion. diff -r dd41afae56a4 -r 4f8b7860819e src/fileio.c --- 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