[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Overlay boundaries and undo
From: |
James Thomas |
Subject: |
Re: Overlay boundaries and undo |
Date: |
Sat, 09 Nov 2024 11:15:29 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eli Zaretskii wrote:
>> I'm trying to understand how overlay boundaries interact with undo. The
>> reason is that I'm tracking a region of a buffer with an overlay, and
>> would like to be able to restore overlay boundaries when text deleted at
>> the overlay boundary is reinserted via undo.
>>
>> - When I delete some text in a range that includes an overlay boundary,
>> the overlay boundary is moved. This works as expected. In the
>> example below I deleted one character, ".", at the end of an overlay,
>> and the overlay boundary moved one character to the left.
>>
>> - If I then undo, the deleted text is reinserted but the overlay
>> boundary is not moved back to its original position.
>> ...
>
> In what version of Emacs do you see this? The implementation of
> overlays was fundamentally changed in Emacs 29, and one of the aspects
> of that change was that overlays are not based on markers anymore.
If that's the case, undoing deletions that straddle overlay boundaries
would not restore the overlay, because the boundary position is lost.
I just tried it and it seems to be so.
--