Skip to content

Commit

Permalink
Reworks opening multiple changes
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Feb 26, 2025
1 parent 1d41f04 commit 4aa7344
Show file tree
Hide file tree
Showing 10 changed files with 161 additions and 220 deletions.
16 changes: 8 additions & 8 deletions contributions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2193,7 +2193,7 @@
"menus": {
"gitlens/graph/commit/changes": [
{
"when": "config.gitlens.views.openChangesInMultiDiffEditor && config.multiDiffEditor.experimental.enabled",
"when": "config.gitlens.views.openChangesInMultiDiffEditor",
"group": "1_gitlens",
"order": 2
}
Expand Down Expand Up @@ -2231,7 +2231,7 @@
"menus": {
"gitlens/graph/commit/changes": [
{
"when": "config.gitlens.views.openChangesInMultiDiffEditor && config.multiDiffEditor.experimental.enabled",
"when": "config.gitlens.views.openChangesInMultiDiffEditor",
"group": "1_gitlens",
"order": 4
}
Expand Down Expand Up @@ -2329,7 +2329,7 @@
"menus": {
"webview/context": [
{
"when": "webviewItem =~ /gitlens:pullrequest\\b(?=.*?\\b\\+refs\\b)/ && config.multiDiffEditor.experimental.enabled",
"when": "webviewItem =~ /gitlens:pullrequest\\b(?=.*?\\b\\+refs\\b)/",
"group": "1_gitlens_actions",
"order": 1
}
Expand Down Expand Up @@ -7415,7 +7415,7 @@
],
"view/item/context": [
{
"when": "viewItem =~ /gitlens:(compare:results(?!:)\\b(?!.*?\\b\\+filtered\\b)|commit|stash|results:files|status-branch:files|status:upstream:(ahead|behind))\\b/ && config.gitlens.views.openChangesInMultiDiffEditor && config.multiDiffEditor.experimental.enabled && !listMultiSelection",
"when": "viewItem =~ /gitlens:(compare:results(?!:)\\b(?!.*?\\b\\+filtered\\b)|commit|stash|results:files|status-branch:files|status:upstream:(ahead|behind))\\b/ && config.gitlens.views.openChangesInMultiDiffEditor && !listMultiSelection",
"group": "inline",
"order": 90,
"alt": "gitlens.views.openChangedFileDiffsWithWorking"
Expand All @@ -7428,7 +7428,7 @@
"menus": {
"gitlens/commit/changes": [
{
"when": "config.gitlens.views.openChangesInMultiDiffEditor && config.multiDiffEditor.experimental.enabled",
"when": "config.gitlens.views.openChangesInMultiDiffEditor",
"group": "1_gitlens",
"order": 2
}
Expand Down Expand Up @@ -7465,7 +7465,7 @@
"menus": {
"gitlens/commit/changes": [
{
"when": "config.gitlens.views.openChangesInMultiDiffEditor && config.multiDiffEditor.experimental.enabled",
"when": "config.gitlens.views.openChangesInMultiDiffEditor",
"group": "1_gitlens",
"order": 4
}
Expand Down Expand Up @@ -7770,12 +7770,12 @@
"menus": {
"view/item/context": [
{
"when": "viewItem =~ /gitlens:(pullrequest\\b(?=.*?\\b\\+refs\\b)|launchpad:item\\b(?=.*?\\b\\+pr\\b))/ && config.multiDiffEditor.experimental.enabled",
"when": "viewItem =~ /gitlens:(pullrequest\\b(?=.*?\\b\\+refs\\b)|launchpad:item\\b(?=.*?\\b\\+pr\\b))/",
"group": "inline",
"order": 2
},
{
"when": "viewItem =~ /gitlens:(pullrequest\\b(?=.*?\\b\\+refs\\b)|launchpad:item\\b(?=.*?\\b\\+pr\\b))/ && config.multiDiffEditor.experimental.enabled && !listMultiSelection",
"when": "viewItem =~ /gitlens:(pullrequest\\b(?=.*?\\b\\+refs\\b)|launchpad:item\\b(?=.*?\\b\\+pr\\b))/ && !listMultiSelection",
"group": "2_gitlens_quickopen",
"order": 1
}
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13333,7 +13333,7 @@
},
{
"command": "gitlens.views.openChangedFileDiffsIndividually",
"when": "config.gitlens.views.openChangesInMultiDiffEditor && config.multiDiffEditor.experimental.enabled",
"when": "config.gitlens.views.openChangesInMultiDiffEditor",
"group": "1_gitlens@2"
},
{
Expand All @@ -13342,7 +13342,7 @@
},
{
"command": "gitlens.views.openChangedFileDiffsWithWorkingIndividually",
"when": "config.gitlens.views.openChangesInMultiDiffEditor && config.multiDiffEditor.experimental.enabled",
"when": "config.gitlens.views.openChangesInMultiDiffEditor",
"group": "1_gitlens@4"
},
{
Expand Down Expand Up @@ -13866,7 +13866,7 @@
},
{
"command": "gitlens.graph.openChangedFileDiffsIndividually",
"when": "config.gitlens.views.openChangesInMultiDiffEditor && config.multiDiffEditor.experimental.enabled",
"when": "config.gitlens.views.openChangesInMultiDiffEditor",
"group": "1_gitlens@2"
},
{
Expand All @@ -13876,7 +13876,7 @@
},
{
"command": "gitlens.graph.openChangedFileDiffsWithWorkingIndividually",
"when": "config.gitlens.views.openChangesInMultiDiffEditor && config.multiDiffEditor.experimental.enabled",
"when": "config.gitlens.views.openChangesInMultiDiffEditor",
"group": "1_gitlens@4"
},
{
Expand Down Expand Up @@ -15688,7 +15688,7 @@
},
{
"command": "gitlens.views.openChangedFileDiffs",
"when": "viewItem =~ /gitlens:(compare:results(?!:)\\b(?!.*?\\b\\+filtered\\b)|commit|stash|results:files|status-branch:files|status:upstream:(ahead|behind))\\b/ && config.gitlens.views.openChangesInMultiDiffEditor && config.multiDiffEditor.experimental.enabled && !listMultiSelection",
"when": "viewItem =~ /gitlens:(compare:results(?!:)\\b(?!.*?\\b\\+filtered\\b)|commit|stash|results:files|status-branch:files|status:upstream:(ahead|behind))\\b/ && config.gitlens.views.openChangesInMultiDiffEditor && !listMultiSelection",
"group": "inline@90",
"alt": "gitlens.views.openChangedFileDiffsWithWorking"
},
Expand Down Expand Up @@ -16273,7 +16273,7 @@
},
{
"command": "gitlens.views.openPullRequestChanges",
"when": "viewItem =~ /gitlens:(pullrequest\\b(?=.*?\\b\\+refs\\b)|launchpad:item\\b(?=.*?\\b\\+pr\\b))/ && config.multiDiffEditor.experimental.enabled",
"when": "viewItem =~ /gitlens:(pullrequest\\b(?=.*?\\b\\+refs\\b)|launchpad:item\\b(?=.*?\\b\\+pr\\b))/",
"group": "inline@2"
},
{
Expand All @@ -16294,7 +16294,7 @@
},
{
"command": "gitlens.views.openPullRequestChanges",
"when": "viewItem =~ /gitlens:(pullrequest\\b(?=.*?\\b\\+refs\\b)|launchpad:item\\b(?=.*?\\b\\+pr\\b))/ && config.multiDiffEditor.experimental.enabled && !listMultiSelection",
"when": "viewItem =~ /gitlens:(pullrequest\\b(?=.*?\\b\\+refs\\b)|launchpad:item\\b(?=.*?\\b\\+pr\\b))/ && !listMultiSelection",
"group": "2_gitlens_quickopen@1"
},
{
Expand Down Expand Up @@ -18802,7 +18802,7 @@
},
{
"command": "gitlens.graph.openPullRequestChanges",
"when": "webviewItem =~ /gitlens:pullrequest\\b(?=.*?\\b\\+refs\\b)/ && config.multiDiffEditor.experimental.enabled",
"when": "webviewItem =~ /gitlens:pullrequest\\b(?=.*?\\b\\+refs\\b)/",
"group": "1_gitlens_actions@1"
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/commands/diffFolderWithRevision.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class DiffFolderWithRevisionCommand extends ActiveEditorCommand {
});
if (pick == null) return;

void openFolderCompare(uri, { repoPath: repoPath, lhs: pick.ref, rhs: gitUri.sha ?? '' });
void openFolderCompare(this.container, uri, { repoPath: repoPath, lhs: pick.ref, rhs: gitUri.sha ?? '' });
} catch (ex) {
Logger.error(ex, 'DiffFolderWithRevisionCommand');
void showGenericErrorMessage('Unable to open comparison');
Expand Down
2 changes: 1 addition & 1 deletion src/commands/diffFolderWithRevisionFrom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class DiffFolderWithRevisionFromCommand extends ActiveEditorCommand {
}
}

void openFolderCompare(uri, { repoPath: repoPath, lhs: args.lhs, rhs: args.rhs });
void openFolderCompare(this.container, uri, { repoPath: repoPath, lhs: args.lhs, rhs: args.rhs });
} catch (ex) {
Logger.error(ex, 'DiffFolderWithRevisionFromCommand');
void showGenericErrorMessage('Unable to open comparison');
Expand Down
5 changes: 0 additions & 5 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1026,11 +1026,6 @@ export type CoreConfig = {
readonly proxySupport: 'fallback' | 'off' | 'on' | 'override';
readonly proxyStrictSSL: boolean;
};
readonly multiDiffEditor: {
readonly experimental: {
readonly enabled: boolean;
};
};
readonly search: {
readonly exclude: Record<string, boolean>;
};
Expand Down
Loading

0 comments on commit 4aa7344

Please sign in to comment.