@codingame/monaco-vscode-scm-service-override 25.1.2 → 26.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/activity.js +106 -60
- package/vscode/src/vs/workbench/contrib/scm/browser/media/scm.css +6 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/menus.js +50 -42
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffDecorator.js +170 -119
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffModel.js +99 -74
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffWidget.js +245 -169
- package/vscode/src/vs/workbench/contrib/scm/browser/scm.contribution.js +321 -328
- package/vscode/src/vs/workbench/contrib/scm/browser/scmAccessibilityHelp.js +44 -46
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.js +596 -511
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.js +256 -266
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoryRenderer.js +72 -67
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.js +947 -671
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.js +18 -16
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewService.js +152 -106
- package/vscode/src/vs/workbench/contrib/scm/browser/workingSet.js +43 -21
- package/vscode/src/vs/workbench/contrib/scm/common/scmService.js +67 -52
|
@@ -26,12 +26,12 @@ import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/obse
|
|
|
26
26
|
|
|
27
27
|
var QuickDiffDecorator_1;
|
|
28
28
|
registerCss(dirtydiffDecorator);
|
|
29
|
-
const quickDiffDecorationCount = ( new RawContextKey(
|
|
29
|
+
const quickDiffDecorationCount = ( new RawContextKey("quickDiffDecorationCount", 0));
|
|
30
30
|
let QuickDiffDecorator = QuickDiffDecorator_1 = class QuickDiffDecorator extends Disposable {
|
|
31
31
|
static createDecoration(className, tooltip, options) {
|
|
32
32
|
const decorationOptions = {
|
|
33
|
-
description:
|
|
34
|
-
isWholeLine: options.isWholeLine
|
|
33
|
+
description: "dirty-diff-decoration",
|
|
34
|
+
isWholeLine: options.isWholeLine
|
|
35
35
|
};
|
|
36
36
|
if (options.gutter) {
|
|
37
37
|
decorationOptions.linesDecorationsClassName = `dirty-diff-glyph ${className}`;
|
|
@@ -57,108 +57,126 @@ let QuickDiffDecorator = QuickDiffDecorator_1 = class QuickDiffDecorator extends
|
|
|
57
57
|
this.quickDiffModelRef = quickDiffModelRef;
|
|
58
58
|
this.configurationService = configurationService;
|
|
59
59
|
this.quickDiffService = quickDiffService;
|
|
60
|
-
const decorations = configurationService.getValue(
|
|
61
|
-
const gutter = decorations ===
|
|
62
|
-
const overview = decorations ===
|
|
63
|
-
const minimap = decorations ===
|
|
64
|
-
const diffAdded = ( localize(
|
|
60
|
+
const decorations = configurationService.getValue("scm.diffDecorations");
|
|
61
|
+
const gutter = decorations === "all" || decorations === "gutter";
|
|
62
|
+
const overview = decorations === "all" || decorations === "overview";
|
|
63
|
+
const minimap = decorations === "all" || decorations === "minimap";
|
|
64
|
+
const diffAdded = ( localize(10760, "Added lines"));
|
|
65
65
|
const diffAddedOptions = {
|
|
66
66
|
gutter,
|
|
67
|
-
overview: {
|
|
68
|
-
|
|
67
|
+
overview: {
|
|
68
|
+
active: overview,
|
|
69
|
+
color: overviewRulerAddedForeground
|
|
70
|
+
},
|
|
71
|
+
minimap: {
|
|
72
|
+
active: minimap,
|
|
73
|
+
color: minimapGutterAddedBackground
|
|
74
|
+
},
|
|
69
75
|
isWholeLine: true
|
|
70
76
|
};
|
|
71
|
-
this.addedOptions = QuickDiffDecorator_1.createDecoration(
|
|
72
|
-
this.addedPatternOptions = QuickDiffDecorator_1.createDecoration(
|
|
73
|
-
this.addedSecondaryOptions = QuickDiffDecorator_1.createDecoration(
|
|
74
|
-
this.addedSecondaryPatternOptions = QuickDiffDecorator_1.createDecoration(
|
|
75
|
-
const diffModified = ( localize(
|
|
77
|
+
this.addedOptions = QuickDiffDecorator_1.createDecoration("dirty-diff-added primary", diffAdded, diffAddedOptions);
|
|
78
|
+
this.addedPatternOptions = QuickDiffDecorator_1.createDecoration("dirty-diff-added primary pattern", diffAdded, diffAddedOptions);
|
|
79
|
+
this.addedSecondaryOptions = QuickDiffDecorator_1.createDecoration("dirty-diff-added secondary", diffAdded, diffAddedOptions);
|
|
80
|
+
this.addedSecondaryPatternOptions = QuickDiffDecorator_1.createDecoration("dirty-diff-added secondary pattern", diffAdded, diffAddedOptions);
|
|
81
|
+
const diffModified = ( localize(10761, "Changed lines"));
|
|
76
82
|
const diffModifiedOptions = {
|
|
77
83
|
gutter,
|
|
78
|
-
overview: {
|
|
79
|
-
|
|
84
|
+
overview: {
|
|
85
|
+
active: overview,
|
|
86
|
+
color: overviewRulerModifiedForeground
|
|
87
|
+
},
|
|
88
|
+
minimap: {
|
|
89
|
+
active: minimap,
|
|
90
|
+
color: minimapGutterModifiedBackground
|
|
91
|
+
},
|
|
80
92
|
isWholeLine: true
|
|
81
93
|
};
|
|
82
|
-
this.modifiedOptions = QuickDiffDecorator_1.createDecoration(
|
|
83
|
-
this.modifiedPatternOptions = QuickDiffDecorator_1.createDecoration(
|
|
84
|
-
this.modifiedSecondaryOptions = QuickDiffDecorator_1.createDecoration(
|
|
85
|
-
this.modifiedSecondaryPatternOptions = QuickDiffDecorator_1.createDecoration(
|
|
86
|
-
const diffDeleted = ( localize(
|
|
94
|
+
this.modifiedOptions = QuickDiffDecorator_1.createDecoration("dirty-diff-modified primary", diffModified, diffModifiedOptions);
|
|
95
|
+
this.modifiedPatternOptions = QuickDiffDecorator_1.createDecoration("dirty-diff-modified primary pattern", diffModified, diffModifiedOptions);
|
|
96
|
+
this.modifiedSecondaryOptions = QuickDiffDecorator_1.createDecoration("dirty-diff-modified secondary", diffModified, diffModifiedOptions);
|
|
97
|
+
this.modifiedSecondaryPatternOptions = QuickDiffDecorator_1.createDecoration("dirty-diff-modified secondary pattern", diffModified, diffModifiedOptions);
|
|
98
|
+
const diffDeleted = ( localize(10762, "Removed lines"));
|
|
87
99
|
const diffDeletedOptions = {
|
|
88
100
|
gutter,
|
|
89
|
-
overview: {
|
|
90
|
-
|
|
101
|
+
overview: {
|
|
102
|
+
active: overview,
|
|
103
|
+
color: overviewRulerDeletedForeground
|
|
104
|
+
},
|
|
105
|
+
minimap: {
|
|
106
|
+
active: minimap,
|
|
107
|
+
color: minimapGutterDeletedBackground
|
|
108
|
+
},
|
|
91
109
|
isWholeLine: false
|
|
92
110
|
};
|
|
93
|
-
this.deletedOptions = QuickDiffDecorator_1.createDecoration(
|
|
94
|
-
this.deletedSecondaryOptions = QuickDiffDecorator_1.createDecoration(
|
|
111
|
+
this.deletedOptions = QuickDiffDecorator_1.createDecoration("dirty-diff-deleted primary", diffDeleted, diffDeletedOptions);
|
|
112
|
+
this.deletedSecondaryOptions = QuickDiffDecorator_1.createDecoration("dirty-diff-deleted secondary", diffDeleted, diffDeletedOptions);
|
|
95
113
|
this._register(configurationService.onDidChangeConfiguration(e => {
|
|
96
|
-
if (e.affectsConfiguration(
|
|
114
|
+
if (e.affectsConfiguration("scm.diffDecorationsGutterPattern")) {
|
|
97
115
|
this.onDidChange();
|
|
98
116
|
}
|
|
99
117
|
}));
|
|
100
|
-
this._register(
|
|
118
|
+
this._register(
|
|
119
|
+
Event.runAndSubscribe(this.quickDiffModelRef.object.onDidChange, () => this.onDidChange())
|
|
120
|
+
);
|
|
101
121
|
}
|
|
102
122
|
onDidChange() {
|
|
103
123
|
if (!this.codeEditor.hasModel()) {
|
|
104
124
|
return;
|
|
105
125
|
}
|
|
106
|
-
const pattern = this.configurationService.getValue(
|
|
107
|
-
const primaryQuickDiff = this.quickDiffModelRef.object.quickDiffs.find(quickDiff => quickDiff.kind ===
|
|
126
|
+
const pattern = this.configurationService.getValue("scm.diffDecorationsGutterPattern");
|
|
127
|
+
const primaryQuickDiff = this.quickDiffModelRef.object.quickDiffs.find(quickDiff => quickDiff.kind === "primary");
|
|
108
128
|
const primaryQuickDiffChanges = this.quickDiffModelRef.object.changes.filter(change => change.providerId === primaryQuickDiff?.id);
|
|
109
129
|
const decorations = [];
|
|
110
130
|
for (const change of this.quickDiffModelRef.object.changes) {
|
|
111
|
-
const quickDiff = this.quickDiffModelRef.object.quickDiffs
|
|
112
|
-
.find(quickDiff => quickDiff.id === change.providerId);
|
|
131
|
+
const quickDiff = this.quickDiffModelRef.object.quickDiffs.find(quickDiff => quickDiff.id === change.providerId);
|
|
113
132
|
if (!quickDiff || !this.quickDiffService.isQuickDiffProviderVisible(quickDiff.id)) {
|
|
114
133
|
continue;
|
|
115
134
|
}
|
|
116
|
-
if (quickDiff.kind !==
|
|
135
|
+
if (quickDiff.kind !== "primary" && ( primaryQuickDiffChanges.some(c => c.change2.modified.intersectsOrTouches(change.change2.modified)))) {
|
|
117
136
|
continue;
|
|
118
137
|
}
|
|
119
138
|
const changeType = getChangeType(change.change);
|
|
120
139
|
const startLineNumber = change.change.modifiedStartLineNumber;
|
|
121
140
|
const endLineNumber = change.change.modifiedEndLineNumber || startLineNumber;
|
|
122
141
|
switch (changeType) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
142
|
+
case ChangeType.Add:
|
|
143
|
+
decorations.push({
|
|
144
|
+
range: {
|
|
145
|
+
startLineNumber: startLineNumber,
|
|
146
|
+
startColumn: 1,
|
|
147
|
+
endLineNumber: endLineNumber,
|
|
148
|
+
endColumn: 1
|
|
149
|
+
},
|
|
150
|
+
options: quickDiff.kind === "primary" || quickDiff.kind === "contributed" ? pattern.added ? this.addedPatternOptions : this.addedOptions : pattern.added ? this.addedSecondaryPatternOptions : this.addedSecondaryOptions
|
|
151
|
+
});
|
|
152
|
+
break;
|
|
153
|
+
case ChangeType.Delete:
|
|
154
|
+
decorations.push({
|
|
155
|
+
range: {
|
|
156
|
+
startLineNumber: startLineNumber,
|
|
157
|
+
startColumn: Number.MAX_VALUE,
|
|
158
|
+
endLineNumber: startLineNumber,
|
|
159
|
+
endColumn: Number.MAX_VALUE
|
|
160
|
+
},
|
|
161
|
+
options: quickDiff.kind === "primary" || quickDiff.kind === "contributed" ? this.deletedOptions : this.deletedSecondaryOptions
|
|
162
|
+
});
|
|
163
|
+
break;
|
|
164
|
+
case ChangeType.Modify:
|
|
165
|
+
decorations.push({
|
|
166
|
+
range: {
|
|
167
|
+
startLineNumber: startLineNumber,
|
|
168
|
+
startColumn: 1,
|
|
169
|
+
endLineNumber: endLineNumber,
|
|
170
|
+
endColumn: 1
|
|
171
|
+
},
|
|
172
|
+
options: quickDiff.kind === "primary" || quickDiff.kind === "contributed" ? pattern.modified ? this.modifiedPatternOptions : this.modifiedOptions : pattern.modified ? this.modifiedSecondaryPatternOptions : this.modifiedSecondaryOptions
|
|
173
|
+
});
|
|
174
|
+
break;
|
|
156
175
|
}
|
|
157
176
|
}
|
|
158
177
|
if (!this.decorationsCollection) {
|
|
159
178
|
this.decorationsCollection = this.codeEditor.createDecorationsCollection(decorations);
|
|
160
|
-
}
|
|
161
|
-
else {
|
|
179
|
+
} else {
|
|
162
180
|
this.decorationsCollection.set(decorations);
|
|
163
181
|
}
|
|
164
182
|
}
|
|
@@ -171,12 +189,16 @@ let QuickDiffDecorator = QuickDiffDecorator_1 = class QuickDiffDecorator extends
|
|
|
171
189
|
super.dispose();
|
|
172
190
|
}
|
|
173
191
|
};
|
|
174
|
-
QuickDiffDecorator = QuickDiffDecorator_1 = ( __decorate([
|
|
175
|
-
( __param(2, IConfigurationService)),
|
|
176
|
-
( __param(3, IQuickDiffService))
|
|
177
|
-
], QuickDiffDecorator));
|
|
192
|
+
QuickDiffDecorator = QuickDiffDecorator_1 = ( __decorate([( __param(2, IConfigurationService)), ( __param(3, IQuickDiffService))], QuickDiffDecorator));
|
|
178
193
|
let QuickDiffWorkbenchController = class QuickDiffWorkbenchController extends Disposable {
|
|
179
|
-
constructor(
|
|
194
|
+
constructor(
|
|
195
|
+
editorService,
|
|
196
|
+
configurationService,
|
|
197
|
+
quickDiffModelService,
|
|
198
|
+
quickDiffService,
|
|
199
|
+
uriIdentityService,
|
|
200
|
+
contextKeyService
|
|
201
|
+
) {
|
|
180
202
|
super();
|
|
181
203
|
this.editorService = editorService;
|
|
182
204
|
this.configurationService = configurationService;
|
|
@@ -185,67 +207,99 @@ let QuickDiffWorkbenchController = class QuickDiffWorkbenchController extends Di
|
|
|
185
207
|
this.uriIdentityService = uriIdentityService;
|
|
186
208
|
this.enabled = false;
|
|
187
209
|
this.decorators = ( new ResourceMap());
|
|
188
|
-
this.viewState = {
|
|
210
|
+
this.viewState = {
|
|
211
|
+
width: 3,
|
|
212
|
+
visibility: "always"
|
|
213
|
+
};
|
|
189
214
|
this.transientDisposables = this._register(( new DisposableStore()));
|
|
190
215
|
this.stylesheet = createStyleSheet(undefined, undefined, this._store);
|
|
191
216
|
this.quickDiffDecorationCount = quickDiffDecorationCount.bindTo(contextKeyService);
|
|
192
|
-
this.activeEditor = observableFromEvent(
|
|
193
|
-
|
|
194
|
-
|
|
217
|
+
this.activeEditor = observableFromEvent(
|
|
218
|
+
this,
|
|
219
|
+
this.editorService.onDidActiveEditorChange,
|
|
220
|
+
() => this.editorService.activeEditor
|
|
221
|
+
);
|
|
222
|
+
this.quickDiffProviders = observableFromEvent(
|
|
223
|
+
this,
|
|
224
|
+
this.quickDiffService.onDidChangeQuickDiffProviders,
|
|
225
|
+
() => this.quickDiffService.providers
|
|
226
|
+
);
|
|
227
|
+
const onDidChangeConfiguration = Event.filter(
|
|
228
|
+
configurationService.onDidChangeConfiguration,
|
|
229
|
+
e => e.affectsConfiguration("scm.diffDecorations")
|
|
230
|
+
);
|
|
195
231
|
this._register(onDidChangeConfiguration(this.onDidChangeConfiguration, this));
|
|
196
232
|
this.onDidChangeConfiguration();
|
|
197
|
-
const onDidChangeDiffWidthConfiguration = Event.filter(
|
|
198
|
-
|
|
233
|
+
const onDidChangeDiffWidthConfiguration = Event.filter(
|
|
234
|
+
configurationService.onDidChangeConfiguration,
|
|
235
|
+
e => e.affectsConfiguration("scm.diffDecorationsGutterWidth")
|
|
236
|
+
);
|
|
237
|
+
this._register(
|
|
238
|
+
onDidChangeDiffWidthConfiguration(this.onDidChangeDiffWidthConfiguration, this)
|
|
239
|
+
);
|
|
199
240
|
this.onDidChangeDiffWidthConfiguration();
|
|
200
|
-
const onDidChangeDiffVisibilityConfiguration = Event.filter(
|
|
201
|
-
|
|
241
|
+
const onDidChangeDiffVisibilityConfiguration = Event.filter(
|
|
242
|
+
configurationService.onDidChangeConfiguration,
|
|
243
|
+
e => e.affectsConfiguration("scm.diffDecorationsGutterVisibility")
|
|
244
|
+
);
|
|
245
|
+
this._register(
|
|
246
|
+
onDidChangeDiffVisibilityConfiguration(this.onDidChangeDiffVisibilityConfiguration, this)
|
|
247
|
+
);
|
|
202
248
|
this.onDidChangeDiffVisibilityConfiguration();
|
|
203
249
|
}
|
|
204
250
|
onDidChangeConfiguration() {
|
|
205
|
-
const enabled = this.configurationService.getValue(
|
|
251
|
+
const enabled = this.configurationService.getValue("scm.diffDecorations") !== "none";
|
|
206
252
|
if (enabled) {
|
|
207
253
|
this.enable();
|
|
208
|
-
}
|
|
209
|
-
else {
|
|
254
|
+
} else {
|
|
210
255
|
this.disable();
|
|
211
256
|
}
|
|
212
257
|
}
|
|
213
258
|
onDidChangeDiffWidthConfiguration() {
|
|
214
|
-
let width = this.configurationService.getValue(
|
|
259
|
+
let width = this.configurationService.getValue("scm.diffDecorationsGutterWidth");
|
|
215
260
|
if (isNaN(width) || width <= 0 || width > 5) {
|
|
216
261
|
width = 3;
|
|
217
262
|
}
|
|
218
|
-
this.setViewState({
|
|
263
|
+
this.setViewState({
|
|
264
|
+
...this.viewState,
|
|
265
|
+
width
|
|
266
|
+
});
|
|
219
267
|
}
|
|
220
268
|
onDidChangeDiffVisibilityConfiguration() {
|
|
221
|
-
const visibility = this.configurationService.getValue(
|
|
222
|
-
this.setViewState({
|
|
269
|
+
const visibility = this.configurationService.getValue("scm.diffDecorationsGutterVisibility");
|
|
270
|
+
this.setViewState({
|
|
271
|
+
...this.viewState,
|
|
272
|
+
visibility
|
|
273
|
+
});
|
|
223
274
|
}
|
|
224
275
|
setViewState(state) {
|
|
225
276
|
this.viewState = state;
|
|
226
277
|
this.stylesheet.textContent = `
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
278
|
+
.monaco-editor .dirty-diff-added,
|
|
279
|
+
.monaco-editor .dirty-diff-modified {
|
|
280
|
+
border-left-width:${state.width}px;
|
|
281
|
+
}
|
|
282
|
+
.monaco-editor .dirty-diff-added.pattern,
|
|
283
|
+
.monaco-editor .dirty-diff-added.pattern:before,
|
|
284
|
+
.monaco-editor .dirty-diff-modified.pattern,
|
|
285
|
+
.monaco-editor .dirty-diff-modified.pattern:before {
|
|
286
|
+
background-size: ${state.width}px ${state.width}px;
|
|
287
|
+
}
|
|
288
|
+
.monaco-editor .dirty-diff-added,
|
|
289
|
+
.monaco-editor .dirty-diff-modified,
|
|
290
|
+
.monaco-editor .dirty-diff-deleted {
|
|
291
|
+
opacity: ${state.visibility === "always" ? 1 : 0};
|
|
292
|
+
}
|
|
293
|
+
`;
|
|
243
294
|
}
|
|
244
295
|
enable() {
|
|
245
296
|
if (this.enabled) {
|
|
246
297
|
this.disable();
|
|
247
298
|
}
|
|
248
|
-
this.transientDisposables.add(Event.any(
|
|
299
|
+
this.transientDisposables.add(Event.any(
|
|
300
|
+
this.editorService.onDidCloseEditor,
|
|
301
|
+
this.editorService.onDidVisibleEditorsChange
|
|
302
|
+
)(() => this.onEditorsChanged()));
|
|
249
303
|
this.onEditorsChanged();
|
|
250
304
|
this.onDidActiveEditorChange();
|
|
251
305
|
this.onDidChangeQuickDiffProviders();
|
|
@@ -278,7 +332,9 @@ let QuickDiffWorkbenchController = class QuickDiffWorkbenchController extends Di
|
|
|
278
332
|
}
|
|
279
333
|
reader.store.add(quickDiffModelRef);
|
|
280
334
|
const visibleDecorationCount = observableFromEvent(this, quickDiffModelRef.object.onDidChange, () => {
|
|
281
|
-
const visibleQuickDiffs = quickDiffModelRef.object.quickDiffs.filter(
|
|
335
|
+
const visibleQuickDiffs = quickDiffModelRef.object.quickDiffs.filter(
|
|
336
|
+
quickDiff => this.quickDiffService.isQuickDiffProviderVisible(quickDiff.id)
|
|
337
|
+
);
|
|
282
338
|
return quickDiffModelRef.object.changes.filter(change => ( visibleQuickDiffs.some(quickDiff => quickDiff.id === change.providerId))).length;
|
|
283
339
|
});
|
|
284
340
|
reader.store.add(autorun(reader => {
|
|
@@ -297,7 +353,7 @@ let QuickDiffWorkbenchController = class QuickDiffWorkbenchController extends Di
|
|
|
297
353
|
continue;
|
|
298
354
|
}
|
|
299
355
|
const visible = this.quickDiffService.isQuickDiffProviderVisible(provider.id);
|
|
300
|
-
const group = provider.kind !==
|
|
356
|
+
const group = provider.kind !== "contributed" ? "0_scm" : "1_contributed";
|
|
301
357
|
const order = index + 1;
|
|
302
358
|
reader.store.add(registerAction2(class extends Action2 {
|
|
303
359
|
constructor() {
|
|
@@ -306,7 +362,9 @@ let QuickDiffWorkbenchController = class QuickDiffWorkbenchController extends Di
|
|
|
306
362
|
title: provider.label,
|
|
307
363
|
toggled: visible ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE,
|
|
308
364
|
menu: {
|
|
309
|
-
id: MenuId.SCMQuickDiffDecorations,
|
|
365
|
+
id: MenuId.SCMQuickDiffDecorations,
|
|
366
|
+
group,
|
|
367
|
+
order
|
|
310
368
|
},
|
|
311
369
|
f1: false
|
|
312
370
|
});
|
|
@@ -349,9 +407,9 @@ let QuickDiffWorkbenchController = class QuickDiffWorkbenchController extends Di
|
|
|
349
407
|
}
|
|
350
408
|
for (const [uri, decoratorMap] of this.decorators.entries()) {
|
|
351
409
|
for (const editorId of ( decoratorMap.keys())) {
|
|
352
|
-
const codeEditor = this.editorService.visibleTextEditorControls
|
|
353
|
-
|
|
354
|
-
|
|
410
|
+
const codeEditor = this.editorService.visibleTextEditorControls.find(
|
|
411
|
+
editor => isCodeEditor(editor) && editor.getId() === editorId && this.uriIdentityService.extUri.isEqual(editor.getModel()?.uri, uri)
|
|
412
|
+
);
|
|
355
413
|
if (!codeEditor) {
|
|
356
414
|
decoratorMap.deleteAndDispose(editorId);
|
|
357
415
|
}
|
|
@@ -367,13 +425,6 @@ let QuickDiffWorkbenchController = class QuickDiffWorkbenchController extends Di
|
|
|
367
425
|
super.dispose();
|
|
368
426
|
}
|
|
369
427
|
};
|
|
370
|
-
QuickDiffWorkbenchController = ( __decorate([
|
|
371
|
-
( __param(0, IEditorService)),
|
|
372
|
-
( __param(1, IConfigurationService)),
|
|
373
|
-
( __param(2, IQuickDiffModelService)),
|
|
374
|
-
( __param(3, IQuickDiffService)),
|
|
375
|
-
( __param(4, IUriIdentityService)),
|
|
376
|
-
( __param(5, IContextKeyService))
|
|
377
|
-
], QuickDiffWorkbenchController));
|
|
428
|
+
QuickDiffWorkbenchController = ( __decorate([( __param(0, IEditorService)), ( __param(1, IConfigurationService)), ( __param(2, IQuickDiffModelService)), ( __param(3, IQuickDiffService)), ( __param(4, IUriIdentityService)), ( __param(5, IContextKeyService))], QuickDiffWorkbenchController));
|
|
378
429
|
|
|
379
430
|
export { QuickDiffWorkbenchController, quickDiffDecorationCount };
|