From 28259cac7074d41fe11603fc3f0954397036583e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 24 Nov 2009 21:33:23 +0000 Subject: [PATCH] (adjust_markers_for_delete): Move it in the right direction! (bug#4803) --- src/ChangeLog | 5 +++++ src/insdel.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index e8df7f71cca..865b6a4c635 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-11-24 Stefan Monnier + + * insdel.c (adjust_markers_for_delete): Move it in the + right direction! (bug#4803) + 2009-11-24 YAMAMOTO Mitsuharu * font.c (font_open_entity): Don't use ASET if font_object is Qnil. diff --git a/src/insdel.c b/src/insdel.c index 0ab199ab1c7..91c5e05d629 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -370,14 +370,14 @@ adjust_markers_for_delete (EMACS_INT from, EMACS_INT from_byte, re-inserted text after undoing a deletion, and must be adjusted to move them to the correct place. */ XSETMISC (marker, m); - record_marker_adjustment (marker, from - charpos); + record_marker_adjustment (marker, from - charpos); } else if (charpos < to) { /* Before-insertion markers will automatically move forward upon re-inserting the deleted text, so we have to arrange for them to move backward to the correct position. */ XSETMISC (marker, m); - record_marker_adjustment (marker, charpos - to); + record_marker_adjustment (marker, to - charpos); } m->charpos = from; m->bytepos = from_byte; -- 2.39.5