Commit 3521bd09 authored by Dmitry Antipov's avatar Dmitry Antipov
Browse files

Fix last change.

parent af1f7e06
......@@ -1374,8 +1374,11 @@ replace_range (ptrdiff_t from, ptrdiff_t to, Lisp_Object new,
the deletion will be undone first. Thus, undo
will insert before deleting, and thus will keep
the markers before and after this text separate. */
record_insert (from + SCHARS (deletion), inschars);
record_delete (from, deletion);
if (!NILP (deletion))
{
record_insert (from + SCHARS (deletion), inschars);
record_delete (from, deletion);
}
GAP_SIZE -= outgoing_insbytes;
GPT += inschars;
......
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