Added separate commands to close main area widgets (editors) #7101
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
Users have been confused by the behavior of the "Close Tab" command invoked with
alt+w
: gitpod-io/gitpod#1180. Changes in this PR to improve this:alt+w
(ctrl/cmd+w
in Electron) maps to "Close Editor" instead of "Close Tab".ctrl/cmd+alt+t
maps to "Close Other Editors" instead of "Close Other Tabs".alt+shift+w
(ctrl/cmd+k ctrl/cmd+w
in Electron) maps to "Close All Editors" instead of "Close All Tabs".Note that the new commands do not make any difference between editors and non-editor-widgets. While this may seem strange given the names of these commands, I believe it is the best way to achieve a behavior that is as close as possible to VS Code.
What we call the main area corresponds to the editor area in VS Code. The "Close Editor", "Close Other Editors" and "Close All Editors" commands in VS Code actually close tabs in the editor area, regardless of whether it is an editor or other kind of widget (e.g. Markdown preview, Extension details, etc.)
The main differences that remain:
How to test
Invoke the commands "Close Tab", "Close Editor", "Close Other Tabs", "Close Other Editors", "Close All Tabs" and "Close All Editors" via command palette, keybinding or menu / context menu.
Review checklist
Reminder for reviewers