diff options
author | Richard M. Stallman <rms@gnu.org> | 2004-05-22 22:15:37 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2004-05-22 22:15:37 +0000 |
commit | 017e09acc2ba852fdbad4d601d715362c81a372a (patch) | |
tree | 019d0d5fdc43313b45d2fe03dae991c00971e8dc /src/insdel.c | |
parent | 6924d3b7d387c74edf23eac389d21e73ef733f5b (diff) | |
download | emacs-017e09acc2ba852fdbad4d601d715362c81a372a.tar.gz |
(del_range_2, replace_range): Don't write an anchor if the gap is empty.
Diffstat (limited to 'src/insdel.c')
-rw-r--r-- | src/insdel.c | 4 |
1 files 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 (); |