aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/abbrev.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/abbrev.c b/src/abbrev.c
index dabc03b2a55..f6253f06ded 100644
--- a/src/abbrev.c
+++ b/src/abbrev.c
@@ -356,10 +356,13 @@ Returns the abbrev symbol, if expansion took place. */)
356 { 356 {
357 SET_PT (wordstart); 357 SET_PT (wordstart);
358 358
359 del_range_both (wordstart, wordstart_byte, wordend, wordend_byte, 1);
360
361 insert_from_string (expansion, 0, 0, SCHARS (expansion), 359 insert_from_string (expansion, 0, 0, SCHARS (expansion),
362 SBYTES (expansion), 1); 360 SBYTES (expansion), 1);
361 del_range_both (PT, PT_BYTE,
362 wordend + (PT - wordstart),
363 wordend_byte + (PT_BYTE - wordstart_byte),
364 1);
365
363 SET_PT (PT + whitecnt); 366 SET_PT (PT + whitecnt);
364 367
365 if (uccount && !lccount) 368 if (uccount && !lccount)