emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/insdel.c


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/src/insdel.c
Date: Sun, 11 Nov 2001 15:04:45 -0500

Index: emacs/src/insdel.c
diff -u emacs/src/insdel.c:1.159 emacs/src/insdel.c:1.160
--- emacs/src/insdel.c:1.159    Fri Oct 26 08:02:21 2001
+++ emacs/src/insdel.c  Sun Nov 11 15:04:45 2001
@@ -1423,13 +1423,6 @@
   if (! EQ (current_buffer->undo_list, Qt))
     deletion = make_buffer_string_both (from, from_byte, to, to_byte, 1);
 
-  if (markers)
-    /* Relocate all markers pointing into the new, larger gap
-       to point at the end of the text before the gap.
-       Do this before recording the deletion,
-       so that undo handles this after reinserting the text.  */
-    adjust_markers_for_delete (from, from_byte, to, to_byte);
-
   GAP_SIZE += nbytes_del;
   ZV -= nchars_del;
   Z -= nchars_del;
@@ -1489,10 +1482,11 @@
      adjusting the markers that bound the overlays.  */
   adjust_overlays_for_delete (from, nchars_del);
   adjust_overlays_for_insert (from, inschars);
+
+  /* Adjust markers for the deletion and the insertion.  */
   if (markers)
-    adjust_markers_for_insert (from, from_byte,
-                              from + inschars, from_byte + outgoing_insbytes,
-                              0);
+    adjust_markers_for_replace (from, from_byte, nchars_del, nbytes_del,
+                               inschars, outgoing_insbytes);
 
   offset_intervals (current_buffer, from, inschars - nchars_del);
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]