changeset 23137:fed2ba47003f

(adjust_after_replace): Fix the code to recode undo information for the case that `before combining' happens. Remove text properties which are added to the new text by offset_intervals.
author Kenichi Handa <handa@m17n.org>
date Fri, 28 Aug 1998 12:33:52 +0000
parents 7a72a7b8718c
children 14e74d2a49cb
files src/insdel.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/insdel.c	Fri Aug 28 12:33:52 1998 +0000
+++ b/src/insdel.c	Fri Aug 28 12:33:52 1998 +0000
@@ -1601,7 +1601,7 @@
 			      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);
 
@@ -1611,7 +1611,13 @@
     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
 
   {