SelectNextOccurrence
SelectNextOccurrence copied to clipboard
Undo behavior differs with multiple cursors
Installed product versions
- Visual Studio: 15.6.4
- This extension: 1.2.17
Description
If you write a word or sentence in VS normally, and press Undo, it deletes that entire word/sentence (not entirely sure what they base the grouping on).
However, if you write the same thing with multiple cursors, and press Undo, you instead only delete the last character you wrote. The difference in behavior here is somewhat jarring.
I did some initial investigation into this issue, and I believe it'll require using the IOleUndoManager from within CommandTarget::ProcessSelections for the relevant commands. I'm not sure if there's any utilities to recreate the existing behavior used for text grouping, but I suspect you'll have to recreate it manually.
Ah yes this behaviour differs. There is also a possibility to go Sublime-style here I think, and implement a timer to commit an undo-context combined with regular commit-chars. I'll see if I can come up with something
Still under investigation, I have not come up with anything really useful yet but if you have any ideas, a pull request i always welcome.
The undo-management branch contains a startingpoint using the view's associated IOleUndoManager, the UndoUnit's Do-action just deletes a char at the moment, which wont work in reality ofcourse.
Closing this as it's been here for five years and I see no way of fixing it at the moment