News for hackers. Stuff that matters.
Re:Text Editor Data Structures: Rethinking Undo by layer8 on Monday December 11, 2023 @05:17PM (#38606239)
What happens when, for example, you atomically replace “mouse” by “elephant”, then select “epha”, and then region-undo?

The reason most editors don’t implement this is probably that it’s hard to conceive of how it should behave in the general case. (That’s not to say that the way Emacs is implementing it isn’t good and useful.)

Re:Text Editor Data Structures: Rethinking Undo by soamv on Monday December 11, 2023 @07:42PM (#38607612)
Great question. I tried it and I got `elephantmouse`. I was surprised by this, but FWIW I've never encountered this edge case in actual usage.