undoStopBefore:false in TextEditor.edit stopped working in 1.18 #38535
Labels
editor-core
Editor basic functionality
info-needed
Issue requires more information from poster
undo-redo
Issues around undo/redo
Milestone
Steps to Reproduce:
I am the author of this extension. The gif on the extension page clearly shows what it does - it modifies text on every keystroke when you have multiple ranges selected. To prevent unnecessary undo stops I pass
to the TextEditor.Edit method, which worked before.
Since 1.18 VSCode creates two undo steps for every keystroke. I traced the problem to #29036 and the commit that fixes it. That commit introduces the concept of
EditOperationType
to create undo stops between different types of edits. What happens is every character is typed with operation typeTyping
, and then my extension does its work with operation typeOther
. That creates two unnecessary undo stops, while I clearly indicate that I don't need any by passingundoStopBefore: false
.Reproduces without extensions: Yes
The text was updated successfully, but these errors were encountered: