Description
Bug Description:
Undo is inconsistent between Theia and VSCode. When working with different editors that are registered to the same file, in VSCode it appears to keep track of actions performed to both editors, so when you undo the change in one editor, it also undoes the change in the other. In Theia it only triggers undo for the specific editor that you are currently editing.
This is a little complex so I've included more information and context below:
Our application provides a Langium DSL as well as GLSP diagram with both editors working on the same file. To make changes to the DSL from GLSP we use language server code actions.
Unfortunately we ran into an issue with undo when running the extension in Theia. In VSCode when you undo a code action from the GLSP editor, it updates the DSL as well as any GLSP specific changes (ie node positioning etc). Attempting to undo the same action in Theia from the GLSP editor, does not trigger the change to be undone from the DSL, it only triggers the GLSP side.
Having looked into this, I noticed that if I register the GLSP editor as a CustomTextEditorProvider instead of CustomEditorProvider then this would trigger the undo change in the DSL as it gets sent to the Monaco Editor. However this then removes any undo capability on the GLSP side.
Steps to Reproduce:
- Package this VSCode Extension and follow the steps provided in the README.md
Additional Information
- Operating System: Windows 10
- Theia Version: 1.58.100
- VS Code API Version: 1.96.0