Skip to content

Commit 9f02d20

Browse files
committed
Adds multiselect settings (off by default)
1 parent f03f110 commit 9f02d20

14 files changed

+34
-17
lines changed

docs/telemetry-events.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,7 @@ or
925925
'context.config.minimap.additionalTypes': string,
926926
'context.config.minimap.dataType': 'commits' | 'lines',
927927
'context.config.minimap.enabled': boolean,
928+
'context.config.multiselect': boolean,
928929
'context.config.onlyFollowFirstParent': boolean,
929930
'context.config.pageItemLimit': number,
930931
'context.config.pullRequests.enabled': boolean,

package.json

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -954,6 +954,13 @@
954954
"scope": "window",
955955
"order": 2
956956
},
957+
"gitlens.graph.multiselect": {
958+
"type": "boolean",
959+
"default": false,
960+
"markdownDescription": "Specifies whether to allow selecting multiple commits in the _Commit Graph_",
961+
"scope": "window",
962+
"order": 10
963+
},
957964
"gitlens.graph.minimap.enabled": {
958965
"type": "boolean",
959966
"default": true,
@@ -1547,47 +1554,54 @@
15471554
"scope": "window",
15481555
"order": 4
15491556
},
1557+
"gitlens.views.multiselect": {
1558+
"type": "boolean",
1559+
"default": false,
1560+
"markdownDescription": "Specifies whether to allow selecting multiple items in the views",
1561+
"scope": "window",
1562+
"order": 5
1563+
},
15501564
"gitlens.views.showCurrentBranchOnTop": {
15511565
"type": "boolean",
15521566
"default": true,
15531567
"markdownDescription": "Specifies whether to always show the current branch at the top of the views",
15541568
"scope": "window",
1555-
"order": 5
1569+
"order": 6
15561570
},
15571571
"gitlens.views.showComparisonContributors": {
15581572
"type": "boolean",
15591573
"default": true,
15601574
"markdownDescription": "Specifies whether to show a _Contributors_ section on comparison results in the views",
15611575
"scope": "window",
1562-
"order": 6
1576+
"order": 10
15631577
},
15641578
"gitlens.views.showContributorsStatistics": {
15651579
"type": "boolean",
15661580
"default": false,
15671581
"markdownDescription": "Specifies whether to show contributor statistics in _Contributors_ sections in the views. This can take a while to compute depending on the repository size",
15681582
"scope": "window",
1569-
"order": 7
1583+
"order": 11
15701584
},
15711585
"gitlens.views.showRelativeDateMarkers": {
15721586
"type": "boolean",
15731587
"default": true,
15741588
"markdownDescription": "Specifies whether to show relative date markers (_Less than a week ago_, _Over a week ago_, _Over a month ago_, etc) on revision (commit) histories in the views",
15751589
"scope": "window",
1576-
"order": 8
1590+
"order": 12
15771591
},
15781592
"gitlens.views.defaultItemLimit": {
15791593
"type": "number",
15801594
"default": 10,
15811595
"markdownDescription": "Specifies the default number of items to show in a view list. Use 0 to specify no limit",
15821596
"scope": "window",
1583-
"order": 10
1597+
"order": 20
15841598
},
15851599
"gitlens.views.pageItemLimit": {
15861600
"type": "number",
15871601
"default": 40,
15881602
"markdownDescription": "Specifies the number of items to show in a each page when paginating a view list. Use 0 to specify no limit",
15891603
"scope": "window",
1590-
"order": 11
1604+
"order": 21
15911605
},
15921606
"gitlens.views.formats.commits.label": {
15931607
"type": "string",

src/config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ export interface GraphConfig {
373373
readonly dataType: 'commits' | 'lines';
374374
readonly additionalTypes: GraphMinimapMarkersAdditionalTypes[];
375375
};
376+
readonly multiselect: boolean;
376377
readonly onlyFollowFirstParent: boolean;
377378
readonly pageItemLimit: number;
378379
readonly pullRequests: {
@@ -690,6 +691,7 @@ export interface ViewsCommonConfig {
690691
readonly tooltip: string;
691692
};
692693
};
694+
readonly multiselect: boolean;
693695
readonly openChangesInMultiDiffEditor: boolean;
694696
readonly pageItemLimit: number;
695697
readonly scm: {

src/views/branchesView.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export class BranchesView extends ViewBase<'branches', BranchesViewNode, Branche
130130
}
131131

132132
override get canSelectMany(): boolean {
133-
return this.container.prereleaseOrDebugging;
133+
return configuration.get('views.multiselect');
134134
}
135135

136136
protected getRoot(): BranchesViewNode {

src/views/commitsView.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ export class CommitsView extends ViewBase<'commits', CommitsViewNode, CommitsVie
234234
}
235235

236236
override get canSelectMany(): boolean {
237-
return this.container.prereleaseOrDebugging;
237+
return configuration.get('views.multiselect');
238238
}
239239

240240
private readonly _state: CommitsViewState = { filterCommits: new Map<string, GitUser[] | undefined>() };

src/views/contributorsView.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export class ContributorsView extends ViewBase<'contributors', ContributorsViewN
141141
}
142142

143143
override get canSelectMany(): boolean {
144-
return this.container.prereleaseOrDebugging;
144+
return configuration.get('views.multiselect');
145145
}
146146

147147
private readonly _state: ContributorsViewState = { hideMergeCommits: true };

src/views/fileHistoryView.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export class FileHistoryView extends ViewBase<
3131
}
3232

3333
override get canSelectMany(): boolean {
34-
return this.container.prereleaseOrDebugging;
34+
return configuration.get('views.multiselect');
3535
}
3636

3737
protected override get showCollapseAll(): boolean {

src/views/lineHistoryView.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class LineHistoryView extends ViewBase<'lineHistory', LineHistoryTrackerN
2121
}
2222

2323
override get canSelectMany(): boolean {
24-
return this.container.prereleaseOrDebugging;
24+
return configuration.get('views.multiselect');
2525
}
2626

2727
protected override get showCollapseAll(): boolean {

src/views/remotesView.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export class RemotesView extends ViewBase<'remotes', RemotesViewNode, RemotesVie
112112
}
113113

114114
override get canSelectMany(): boolean {
115-
return this.container.prereleaseOrDebugging;
115+
return configuration.get('views.multiselect');
116116
}
117117

118118
protected getRoot(): RemotesViewNode {

src/views/searchAndCompareView.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ export class SearchAndCompareView extends ViewBase<
280280
}
281281

282282
override get canSelectMany(): boolean {
283-
return this.container.prereleaseOrDebugging;
283+
return configuration.get('views.multiselect');
284284
}
285285

286286
protected getRoot(): SearchAndCompareViewNode {

0 commit comments

Comments
 (0)