Commit 7f5d2c72 authored by Stefan Monnier's avatar Stefan Monnier

(Finsert_file_contents): Adjust offsets when replacing

within a narrowed buffer.
parent ffdbbc01
2008-02-14 Stefan Monnier <monnier@iro.umontreal.ca>
* fileio.c (Finsert_file_contents): Adjust offsets when replacing
within a narrowed buffer.
2008-02-14 Kenichi Handa <handa@ni.aist.go.jp>
* coding.c (decode_coding_object, encode_coding_object):
......
......@@ -4338,10 +4338,12 @@ variable `last-coding-system-used' to the coding system actually used. */)
SET_PT_BOTH (temp, same_at_start);
same_at_start_charpos
= buf_bytepos_to_charpos (XBUFFER (conversion_buffer),
same_at_start);
same_at_start - BEGV_BYTE
+ BUF_BEG_BYTE (XBUFFER (conversion_buffer)));
inserted_chars
= (buf_bytepos_to_charpos (XBUFFER (conversion_buffer),
same_at_start + inserted)
same_at_start + inserted - BEGV_BYTE
+ BUF_BEG_BYTE (XBUFFER (conversion_buffer)))
- same_at_start_charpos);
/* This binding is to avoid ask-user-about-supersession-threat
being called in insert_from_buffer (via in
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment