From: Richard M. Stallman Date: Sat, 22 May 2004 22:15:37 +0000 (+0000) Subject: (del_range_2, replace_range): Don't write an anchor if the gap is empty. X-Git-Tag: ttn-vms-21-2-B4~6094 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=017e09acc2ba852fdbad4d601d715362c81a372a;p=emacs.git (del_range_2, replace_range): Don't write an anchor if the gap is empty. --- 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 ();