changeset 55740:eba675d00657

(del_range_2, replace_range): Don't write an anchor if the gap is empty.
author Richard M. Stallman <rms@gnu.org>
date Sat, 22 May 2004 22:15:37 +0000
parents cf63ed17e21c
children 6433313b236b
files src/insdel.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/insdel.c	Sat May 22 22:11:24 2004 +0000
+++ b/src/insdel.c	Sat May 22 22:15:37 2004 +0000
@@ -1556,7 +1556,7 @@
   Z_BYTE -= nbytes_del;
   GPT = from;
   GPT_BYTE = from_byte;
-  *(GPT_ADDR) = 0;		/* Put an anchor.  */
+  if (GAP_SIZE > 0) *(GPT_ADDR) = 0; /* Put an anchor.  */
 
   if (GPT_BYTE < GPT)
     abort ();
@@ -1839,7 +1839,7 @@
   Z -= nchars_del;
   GPT = from;
   GPT_BYTE = from_byte;
-  *(GPT_ADDR) = 0;		/* Put an anchor.  */
+  if (GAP_SIZE > 0) *(GPT_ADDR) = 0; /* Put an anchor.  */
 
   if (GPT_BYTE < GPT)
     abort ();