GNU bug report logs -
#21523
25.0.50; Undo with active region adds extra text
Previous Next
Full log
View this message in rfc822 format
Eli Zaretskii <eliz <at> gnu.org> writes:
> Is signaling an error okay?
Yup.
> Because then it looks like an off-by-one
> error somewhere -- the following slightly modified recipe works as
> expected:
>
> emacs -Q
> C-u 23 M-g c ; go to "text"
> M-c
> C-f ; the crucial difference!
> C-SPC
> C-e
> C-/
> => user-error: No further undo information for region
>
> So the problem seems to be that in the original recipe the region
> starts immediately after the end of the modified portion of text.
Yup; I'm seeing the same thing, so this does indeed look like a
off-by-one error. And... it's in `undo-elt-in-region', I think, called
by (basically) (undo-make-selective-list (mark) (point)).
There's basically no test cases for this function, I think?
Actually, the problem seems to be in undo-adjust-elt, which was
rewritten in 2014 to fix bug#17235.
I've now added a test case (commented out), but I don't quite understand
the logic in undo-adjust-elt... anybody see something obviously wrong?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 2 years and 339 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.