we advance it if either its insertion-type is t
or BEFORE_MARKERS is true. */
-static void
+void
adjust_markers_for_insert (ptrdiff_t from, ptrdiff_t from_byte,
ptrdiff_t to, ptrdiff_t to_byte, bool before_markers)
{
ptrdiff_t, ptrdiff_t);
extern void adjust_markers_for_delete (ptrdiff_t, ptrdiff_t,
ptrdiff_t, ptrdiff_t);
+extern void adjust_markers_for_insert (ptrdiff_t, ptrdiff_t,
+ ptrdiff_t, ptrdiff_t, bool);
extern void adjust_markers_bytepos (ptrdiff_t, ptrdiff_t,
ptrdiff_t, ptrdiff_t, int);
extern void replace_range (ptrdiff_t, ptrdiff_t, Lisp_Object, bool, bool,
if (NILP (BVAR (XBUFFER (p->buffer), enable_multibyte_characters))
&& ! CODING_MAY_REQUIRE_DECODING (process_coding))
{
- insert_1_both (buf, nread, nread, 0, 0, 0);
+ insert_1_both (buf, nread, nread, 0, 0, 1);
signal_after_change (PT - nread, 0, nread);
}
else
specbind (Qinhibit_modification_hooks, Qt);
decode_coding_c_string (process_coding,
(unsigned char *) buf, nread, curbuf);
+ adjust_markers_for_insert (PT, PT_BYTE,
+ PT + process_coding->produced_char,
+ PT_BYTE + process_coding->produced, true);
unbind_to (count1, Qnil);
read_process_output_set_last_coding_system (p, process_coding);