changeset 58735:dc21606c560a

(insert_from_string_before_markers) (insert_from_string): Don't modify buffer on empty insertion.
author Richard M. Stallman <rms@gnu.org>
date Thu, 02 Dec 2004 23:37:13 +0000
parents 5bc7de720277
children 311652551ce2
files src/insdel.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/insdel.c	Thu Dec 02 23:36:53 2004 +0000
+++ b/src/insdel.c	Thu Dec 02 23:37:13 2004 +0000
@@ -1057,6 +1057,10 @@
      int inherit;
 {
   int opoint = PT;
+
+  if (SCHARS (string) == 0)
+    return;
+
   insert_from_string_1 (string, pos, pos_byte, length, length_byte,
 			inherit, 0);
   signal_after_change (opoint, 0, PT - opoint);
@@ -1074,6 +1078,10 @@
      int inherit;
 {
   int opoint = PT;
+
+  if (SCHARS (string) == 0)
+    return;
+
   insert_from_string_1 (string, pos, pos_byte, length, length_byte,
 			inherit, 1);
   signal_after_change (opoint, 0, PT - opoint);