len, len_byte,
combined_before_bytes, combined_after_bytes);
if (STRINGP (prev_text))
- record_delete (from, prev_text);
+ record_delete (from - !!combined_before_bytes, prev_text);
record_insert (from - !!combined_before_bytes,
len - combined_before_bytes + !!combined_before_bytes);
adjust_overlays_for_delete (from, nchars_del - len);
#ifdef USE_TEXT_PROPERTIES
if (BUF_INTERVALS (current_buffer) != 0)
- offset_intervals (current_buffer, from, len - nchars_del);
+ {
+ offset_intervals (current_buffer, from, len - nchars_del);
+ if (len - nchars_del > 0)
+ Fset_text_properties (make_number (from),
+ make_number (from + len - nchars_del),
+ Qnil, Qnil);
+ }
#endif
{