The openMergeEditor command should check the active tab when it is called without an URI (#161072)

https://github.com/microsoft/vscode/issues/160924
This commit is contained in:
Johannes Rieken 2022-09-16 11:55:06 +02:00 committed by GitHub
parent 3ad265eb02
commit 21a2eca3b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -445,6 +445,12 @@ export class CommandCenter {
@command('git.openMergeEditor')
async openMergeEditor(uri: unknown) {
if (uri === undefined) {
// fallback to active editor...
if (window.tabGroups.activeTabGroup.activeTab?.input instanceof TabInputText) {
uri = window.tabGroups.activeTabGroup.activeTab.input.uri;
}
}
if (!(uri instanceof Uri)) {
return;
}