Feature request: undo/redo restore position

30 views
Skip to first unread message

Austin Green

unread,
May 8, 2020, 6:38:37 PM5/8/20
to scintilla-interest
Would it be possible for the caret position to be saved and restored on undo and redo?

Neil Hodgson

unread,
May 8, 2020, 7:17:37 PM5/8/20
to Scintilla mailing list
Austin Green:

> Would it be possible for the caret position to be saved and restored on undo and redo?

There may be multiple views (with independent selections) of a single document and thus one undo stack. There may also be multiple carets in a single view. An implementation should account for both these (which could be refusal to support these possibilities) and be an option. Applications that do not turn this option on should not see a significant storage or speed cost.

Neil

Austin Green

unread,
May 9, 2020, 12:10:46 AM5/9/20
to scintilla-interest
My need, and I suspect most people's, would only be for the single-caret situation. For multi-caret, perhaps save only the main caret. Storage required would be two integers per undo entry: caret offset in buffer and virtual space.
Reply all
Reply to author
Forward
0 new messages