diff options
Diffstat (limited to 'src')
| -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 6b0aa9db3e3..58c3e15c233 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -1374,8 +1374,11 @@ replace_range (ptrdiff_t from, ptrdiff_t to, Lisp_Object new, | |||
| 1374 | the deletion will be undone first. Thus, undo | 1374 | the deletion will be undone first. Thus, undo |
| 1375 | will insert before deleting, and thus will keep | 1375 | will insert before deleting, and thus will keep |
| 1376 | the markers before and after this text separate. */ | 1376 | the markers before and after this text separate. */ |
| 1377 | record_insert (from + SCHARS (deletion), inschars); | 1377 | if (!NILP (deletion)) |
| 1378 | record_delete (from, deletion); | 1378 | { |
| 1379 | record_insert (from + SCHARS (deletion), inschars); | ||
| 1380 | record_delete (from, deletion); | ||
| 1381 | } | ||
| 1379 | 1382 | ||
| 1380 | GAP_SIZE -= outgoing_insbytes; | 1383 | GAP_SIZE -= outgoing_insbytes; |
| 1381 | GPT += inschars; | 1384 | GPT += inschars; |