diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2013-08-02 12:32:32 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2013-08-02 12:32:32 +0400 |
commit | 3521bd09b3c11b68c009d290efb4350289f2d3e6 (patch) | |
tree | cd0341908128ebe4f4788a55d70f88d955163594 /src/insdel.c | |
parent | af1f7e0682d9182be94de6d4ba30e76e1f4a75be (diff) |
Fix last change.
Diffstat (limited to 'src/insdel.c')
-rw-r--r-- | src/insdel.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/insdel.c b/src/insdel.c index 6b0aa9db3e..58c3e15c23 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -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; |