Commit 017e09ac authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(del_range_2, replace_range): Don't write an anchor if the gap is empty.

parent 6924d3b7
......@@ -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 ();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment