textadept icon indicating copy to clipboard operation
textadept copied to clipboard

Undo deletion & caret position

Open neumond opened this issue 1 year ago • 2 comments
trafficstars

When I delete some text using my custom line delete command or delete a selection of text leaving caret at the beginning of the selection, then undo, caret moves to the end of deleted text. I expect it to restore caret position along with text. Screenshot from 2024-04-15 18-56-11

neumond avatar Apr 15 '24 16:04 neumond

I like the editor, it's the thing I've always wanted: simple optimized grid of text, first class GUI, non-esoteric scripting language, conventional set of hotkeys without modes and ability to use non-file buffers. Thank you for your work!

neumond avatar Apr 15 '24 16:04 neumond

Scintilla (the editor component Textadept uses) does not restore caret position as part of an "undo" operation. There has been some discussion on the mailing list regarding this, but nothing definitive came of it: https://groups.google.com/g/scintilla-interest/c/CB20mc50kt0/m/1PT0oRJ4AAAJ

At this time, there's no robust way to do what you are expecting, even though it would be nice to have :(

By the way, thank you for the detailed report!

orbitalquark avatar Apr 15 '24 17:04 orbitalquark