Mitchell
unread,Oct 22, 2023, 11:02:38 AM10/22/23Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to scintilla...@googlegroups.com
Hi Neil,
Is there a reason for invalidating the caret before performing undo, and
then setting an empty selection after successful undo? If you have
multiple selections active and you are typing into all of them at once,
but perform undo, you lose those multiple selections. It would be really
helpful to leave them be. I commented out "InvalidateCaret()" and
"SetEmptySelection(newPos)" from Editor::Undo() and I'm not getting any
weird behavior with some basic tests.
I also changed Editor::Redo() to increment each selection range's anchor
and caret based on the difference between "SelectionStart().Position()"
and "newPos", and basic testing shows expected behavior -- my multiple
carets move to their prior positions before undo-redo.
We can probably keep old behavior if "sel.Count() == 1", but for the
case where it's greater than one, perhaps we can change it? I can
prepare a patch for your consideration if you think it's worth it.
Cheers,
Mitchell