editor: add 'revert and close editor' command#9728
Merged
vince-fugnitto merged 1 commit intomasterfrom Jul 14, 2021
Merged
Conversation
colin-grant-work
approved these changes
Jul 13, 2021
Contributor
colin-grant-work
left a comment
There was a problem hiding this comment.
I confirm that both internal and external (plugin) invocations of the command are successful, and that in both cases the editor is reverted to its last saved state and then closed.
msujew
approved these changes
Jul 14, 2021
Member
msujew
left a comment
There was a problem hiding this comment.
I can confirm that the revert and close editor command is visible to the user and behaves as expected. Code LGTM.
919f41d to
e5bff91
Compare
The pull-request moves the `revert and close editor` command out of the plugin-system so it can be used by end-users as well as for vscode plugins. Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
e5bff91 to
9563009
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
Fixes: #7575.
The command
'workbench.action.revertAndCloseActiveEditor'was added as part of #7702 but was only available to the plugin-system unlike vscode. The changes update the functionality to allow users to execute the command from the application, while it also working from a vscode plugin.How to test
autoSaveis off (to properly testrevert)View: Revert and Close Editor- should successfully revert the changes and close the editorTest: Revert and Close Editor- should successfully revert the changes and close the editorReview checklist
Reminder for reviewers
Signed-off-by: vince-fugnitto vincent.fugnitto@ericsson.com