bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#4803: marked as done (Undo fails to restore marker position correctl


From: Emacs bug Tracking System
Subject: bug#4803: marked as done (Undo fails to restore marker position correctly)
Date: Tue, 24 Nov 2009 21:40:04 +0000

Your message dated Tue, 24 Nov 2009 16:33:39 -0500
with message-id <address@hidden>
and subject line Re: Undo fails to restore marker position correctly
has caused the Emacs bug report #4803,
regarding Undo fails to restore marker position correctly
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact address@hidden
immediately.)


-- 
4803: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4803
Emacs Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Undo fails to restore marker position correctly Date: Sat, 24 Oct 2009 17:18:48 -0700 User-agent: Mutt/1.5.20 (2009-06-14)
In GNU Emacs 23.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.16.6)
  of 2009-10-17


Steps to reproduce:
-------------------
(switch-to-buffer "*scratch*")  ; any buffer containing some text will do
(setq mrk (make-marker))
(move-marker mrk 5)             ; any position within text will do
(set-marker-insertion-type mrk t)
(delete-region 1 10)
(undo)

Marker mrk is now at position 15 in *scratch* instead of 5.


Toby
--
Dr T. S. Cubitt
Quantum Information Theory group
Department of Mathematics
University of Bristol
United Kingdom

email: address@hidden
web: www.dr-qubit.org



--- End Message ---
--- Begin Message --- Subject: Re: Undo fails to restore marker position correctly Date: Tue, 24 Nov 2009 16:33:39 -0500 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)
> (switch-to-buffer "*scratch*")  ; any buffer containing some text will do
> (setq mrk (make-marker))
> (move-marker mrk 5)             ; any position within text will do
> (set-marker-insertion-type mrk t)
> (delete-region 1 10)
> (undo)

> Marker mrk is now at position 15 in *scratch* instead of 5.

I've just installed the patch below should should fix it.
Thanks for catching it!


        Stefan


=== modified file 'src/insdel.c'
--- src/insdel.c        2009-11-24 15:30:54 +0000
+++ src/insdel.c        2009-11-24 21:28:22 +0000
@@ -377,7 +377,7 @@
               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;


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]