[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21523: 25.0.50; Undo with active region adds extra text
From: |
Eli Zaretskii |
Subject: |
bug#21523: 25.0.50; Undo with active region adds extra text |
Date: |
Mon, 16 Aug 2021 19:30:37 +0300 |
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: drew.adams@oracle.com, 21523@debbugs.gnu.org
> Date: Mon, 16 Aug 2021 15:53:55 +0200
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> This bug is still present in Emacs 28.
> >
> > Why is it a bug? What is the expected "non-buggy" behavior in this
> > case?
>
> I'd expect it to either do nothing (since we're undoing in a region, and
> the changed text is outside the region), or change the "This" to
> "this". Leaving "Thisthis" in the buffer has to be a bug no matter how
> you look at it.
Is signaling an error okay? 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.