From 017e09acc2ba852fdbad4d601d715362c81a372a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 22 May 2004 22:15:37 +0000 Subject: [PATCH] (del_range_2, replace_range): Don't write an anchor if the gap is empty. --- src/insdel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/insdel.c b/src/insdel.c index 5e3f69161e0..ffe7006a45b 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -1556,7 +1556,7 @@ replace_range (from, to, new, prepare, inherit, markers) 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 @@ del_range_2 (from, from_byte, to, to_byte, ret_string) 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 (); -- 2.39.5