Skip to content

Commit 4aa7344

Browse files
committed
Reworks opening multiple changes
1 parent 1d41f04 commit 4aa7344

File tree

10 files changed

+161
-220
lines changed

10 files changed

+161
-220
lines changed

contributions.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2193,7 +2193,7 @@
21932193
"menus": {
21942194
"gitlens/graph/commit/changes": [
21952195
{
2196-
"when": "config.gitlens.views.openChangesInMultiDiffEditor && config.multiDiffEditor.experimental.enabled",
2196+
"when": "config.gitlens.views.openChangesInMultiDiffEditor",
21972197
"group": "1_gitlens",
21982198
"order": 2
21992199
}
@@ -2231,7 +2231,7 @@
22312231
"menus": {
22322232
"gitlens/graph/commit/changes": [
22332233
{
2234-
"when": "config.gitlens.views.openChangesInMultiDiffEditor && config.multiDiffEditor.experimental.enabled",
2234+
"when": "config.gitlens.views.openChangesInMultiDiffEditor",
22352235
"group": "1_gitlens",
22362236
"order": 4
22372237
}
@@ -2329,7 +2329,7 @@
23292329
"menus": {
23302330
"webview/context": [
23312331
{
2332-
"when": "webviewItem =~ /gitlens:pullrequest\\b(?=.*?\\b\\+refs\\b)/ && config.multiDiffEditor.experimental.enabled",
2332+
"when": "webviewItem =~ /gitlens:pullrequest\\b(?=.*?\\b\\+refs\\b)/",
23332333
"group": "1_gitlens_actions",
23342334
"order": 1
23352335
}
@@ -7415,7 +7415,7 @@
74157415
],
74167416
"view/item/context": [
74177417
{
7418-
"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",
7418+
"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",
74197419
"group": "inline",
74207420
"order": 90,
74217421
"alt": "gitlens.views.openChangedFileDiffsWithWorking"
@@ -7428,7 +7428,7 @@
74287428
"menus": {
74297429
"gitlens/commit/changes": [
74307430
{
7431-
"when": "config.gitlens.views.openChangesInMultiDiffEditor && config.multiDiffEditor.experimental.enabled",
7431+
"when": "config.gitlens.views.openChangesInMultiDiffEditor",
74327432
"group": "1_gitlens",
74337433
"order": 2
74347434
}
@@ -7465,7 +7465,7 @@
74657465
"menus": {
74667466
"gitlens/commit/changes": [
74677467
{
7468-
"when": "config.gitlens.views.openChangesInMultiDiffEditor && config.multiDiffEditor.experimental.enabled",
7468+
"when": "config.gitlens.views.openChangesInMultiDiffEditor",
74697469
"group": "1_gitlens",
74707470
"order": 4
74717471
}
@@ -7770,12 +7770,12 @@
77707770
"menus": {
77717771
"view/item/context": [
77727772
{
7773-
"when": "viewItem =~ /gitlens:(pullrequest\\b(?=.*?\\b\\+refs\\b)|launchpad:item\\b(?=.*?\\b\\+pr\\b))/ && config.multiDiffEditor.experimental.enabled",
7773+
"when": "viewItem =~ /gitlens:(pullrequest\\b(?=.*?\\b\\+refs\\b)|launchpad:item\\b(?=.*?\\b\\+pr\\b))/",
77747774
"group": "inline",
77757775
"order": 2
77767776
},
77777777
{
7778-
"when": "viewItem =~ /gitlens:(pullrequest\\b(?=.*?\\b\\+refs\\b)|launchpad:item\\b(?=.*?\\b\\+pr\\b))/ && config.multiDiffEditor.experimental.enabled && !listMultiSelection",
7778+
"when": "viewItem =~ /gitlens:(pullrequest\\b(?=.*?\\b\\+refs\\b)|launchpad:item\\b(?=.*?\\b\\+pr\\b))/ && !listMultiSelection",
77797779
"group": "2_gitlens_quickopen",
77807780
"order": 1
77817781
}

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13333,7 +13333,7 @@
1333313333
},
1333413334
{
1333513335
"command": "gitlens.views.openChangedFileDiffsIndividually",
13336-
"when": "config.gitlens.views.openChangesInMultiDiffEditor && config.multiDiffEditor.experimental.enabled",
13336+
"when": "config.gitlens.views.openChangesInMultiDiffEditor",
1333713337
"group": "1_gitlens@2"
1333813338
},
1333913339
{
@@ -13342,7 +13342,7 @@
1334213342
},
1334313343
{
1334413344
"command": "gitlens.views.openChangedFileDiffsWithWorkingIndividually",
13345-
"when": "config.gitlens.views.openChangesInMultiDiffEditor && config.multiDiffEditor.experimental.enabled",
13345+
"when": "config.gitlens.views.openChangesInMultiDiffEditor",
1334613346
"group": "1_gitlens@4"
1334713347
},
1334813348
{
@@ -13866,7 +13866,7 @@
1386613866
},
1386713867
{
1386813868
"command": "gitlens.graph.openChangedFileDiffsIndividually",
13869-
"when": "config.gitlens.views.openChangesInMultiDiffEditor && config.multiDiffEditor.experimental.enabled",
13869+
"when": "config.gitlens.views.openChangesInMultiDiffEditor",
1387013870
"group": "1_gitlens@2"
1387113871
},
1387213872
{
@@ -13876,7 +13876,7 @@
1387613876
},
1387713877
{
1387813878
"command": "gitlens.graph.openChangedFileDiffsWithWorkingIndividually",
13879-
"when": "config.gitlens.views.openChangesInMultiDiffEditor && config.multiDiffEditor.experimental.enabled",
13879+
"when": "config.gitlens.views.openChangesInMultiDiffEditor",
1388013880
"group": "1_gitlens@4"
1388113881
},
1388213882
{
@@ -15688,7 +15688,7 @@
1568815688
},
1568915689
{
1569015690
"command": "gitlens.views.openChangedFileDiffs",
15691-
"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",
15691+
"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",
1569215692
"group": "inline@90",
1569315693
"alt": "gitlens.views.openChangedFileDiffsWithWorking"
1569415694
},
@@ -16273,7 +16273,7 @@
1627316273
},
1627416274
{
1627516275
"command": "gitlens.views.openPullRequestChanges",
16276-
"when": "viewItem =~ /gitlens:(pullrequest\\b(?=.*?\\b\\+refs\\b)|launchpad:item\\b(?=.*?\\b\\+pr\\b))/ && config.multiDiffEditor.experimental.enabled",
16276+
"when": "viewItem =~ /gitlens:(pullrequest\\b(?=.*?\\b\\+refs\\b)|launchpad:item\\b(?=.*?\\b\\+pr\\b))/",
1627716277
"group": "inline@2"
1627816278
},
1627916279
{
@@ -16294,7 +16294,7 @@
1629416294
},
1629516295
{
1629616296
"command": "gitlens.views.openPullRequestChanges",
16297-
"when": "viewItem =~ /gitlens:(pullrequest\\b(?=.*?\\b\\+refs\\b)|launchpad:item\\b(?=.*?\\b\\+pr\\b))/ && config.multiDiffEditor.experimental.enabled && !listMultiSelection",
16297+
"when": "viewItem =~ /gitlens:(pullrequest\\b(?=.*?\\b\\+refs\\b)|launchpad:item\\b(?=.*?\\b\\+pr\\b))/ && !listMultiSelection",
1629816298
"group": "2_gitlens_quickopen@1"
1629916299
},
1630016300
{
@@ -18802,7 +18802,7 @@
1880218802
},
1880318803
{
1880418804
"command": "gitlens.graph.openPullRequestChanges",
18805-
"when": "webviewItem =~ /gitlens:pullrequest\\b(?=.*?\\b\\+refs\\b)/ && config.multiDiffEditor.experimental.enabled",
18805+
"when": "webviewItem =~ /gitlens:pullrequest\\b(?=.*?\\b\\+refs\\b)/",
1880618806
"group": "1_gitlens_actions@1"
1880718807
},
1880818808
{

src/commands/diffFolderWithRevision.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export class DiffFolderWithRevisionCommand extends ActiveEditorCommand {
6767
});
6868
if (pick == null) return;
6969

70-
void openFolderCompare(uri, { repoPath: repoPath, lhs: pick.ref, rhs: gitUri.sha ?? '' });
70+
void openFolderCompare(this.container, uri, { repoPath: repoPath, lhs: pick.ref, rhs: gitUri.sha ?? '' });
7171
} catch (ex) {
7272
Logger.error(ex, 'DiffFolderWithRevisionCommand');
7373
void showGenericErrorMessage('Unable to open comparison');

src/commands/diffFolderWithRevisionFrom.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export class DiffFolderWithRevisionFromCommand extends ActiveEditorCommand {
9595
}
9696
}
9797

98-
void openFolderCompare(uri, { repoPath: repoPath, lhs: args.lhs, rhs: args.rhs });
98+
void openFolderCompare(this.container, uri, { repoPath: repoPath, lhs: args.lhs, rhs: args.rhs });
9999
} catch (ex) {
100100
Logger.error(ex, 'DiffFolderWithRevisionFromCommand');
101101
void showGenericErrorMessage('Unable to open comparison');

src/config.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,11 +1026,6 @@ export type CoreConfig = {
10261026
readonly proxySupport: 'fallback' | 'off' | 'on' | 'override';
10271027
readonly proxyStrictSSL: boolean;
10281028
};
1029-
readonly multiDiffEditor: {
1030-
readonly experimental: {
1031-
readonly enabled: boolean;
1032-
};
1033-
};
10341029
readonly search: {
10351030
readonly exclude: Record<string, boolean>;
10361031
};

0 commit comments

Comments
 (0)