@codingame/monaco-vscode-scm-service-override 24.3.0 → 25.0.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-scm-service-override",
3
- "version": "24.3.0",
3
+ "version": "25.0.1",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - scm service-override",
6
6
  "keywords": [],
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-api": "24.3.0"
18
+ "@codingame/monaco-vscode-api": "25.0.1"
19
19
  },
20
20
  "main": "index.js",
21
21
  "module": "index.js",
@@ -46,7 +46,7 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
46
46
  { name: 'activeRepositoryBranchName', contextKey: ActiveRepositoryContextKeys.ActiveRepositoryBranchName.key, }
47
47
  ]);
48
48
  this._countBadgeConfig = observableConfigValue('scm.countBadge', 'all', this.configurationService);
49
- this._repositories = observableFromEvent(this, Event.any(this.scmService.onDidAddRepository, this.scmService.onDidRemoveRepository), () => this.scmService.repositories);
49
+ this._repositories = observableFromEvent(this, Event.any(this.scmService.onDidAddRepository, this.scmService.onDidRemoveRepository), () => Iterable.filter(this.scmService.repositories, r => r.provider.isHidden !== true));
50
50
  this._activeRepositoryHistoryItemRefName = derived(reader => {
51
51
  const activeRepository = this.scmViewService.activeRepository.read(reader);
52
52
  const historyProvider = activeRepository?.repository.provider.historyProvider.read(reader);
@@ -103,7 +103,7 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
103
103
  if (count === 0) {
104
104
  return;
105
105
  }
106
- const badge = ( new NumberBadge(count, num => ( localize(10406, '{0} pending changes', num))));
106
+ const badge = ( new NumberBadge(count, num => ( localize(10436, '{0} pending changes', num))));
107
107
  store.add(this.activityService.showViewActivity(VIEW_PANE_ID, { badge }));
108
108
  }
109
109
  _updateStatusBar(activeRepository, commands, store) {
@@ -118,7 +118,7 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
118
118
  const tooltip = `${label}${command.tooltip ? ` - ${command.tooltip}` : ''}`;
119
119
  const genericCommandName = getStatusBarCommandGenericName(command);
120
120
  const statusbarEntry = {
121
- name: ( localize(10407, "Source Control")) + (genericCommandName ? ` ${genericCommandName}` : ''),
121
+ name: ( localize(10437, "Source Control")) + (genericCommandName ? ` ${genericCommandName}` : ''),
122
122
  text: command.title,
123
123
  ariaLabel: tooltip,
124
124
  tooltip,
@@ -128,10 +128,10 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
128
128
  this.statusbarService.addEntry(statusbarEntry, `status.scm.${index}`, StatusbarAlignment.LEFT, 10000) :
129
129
  this.statusbarService.addEntry(statusbarEntry, `status.scm.${index}`, StatusbarAlignment.LEFT, { location: { id: `status.scm.${index - 1}`, priority: 10000 }, alignment: StatusbarAlignment.RIGHT, compact: true }));
130
130
  }
131
- if (this.scmService.repositoryCount > 1) {
131
+ if (this.scmViewService.repositories.length > 1) {
132
132
  const icon = getSCMRepositoryIcon(activeRepository, activeRepository.repository);
133
133
  const repositoryStatusbarEntry = {
134
- name: ( localize(10408, "Source Control Provider")),
134
+ name: ( localize(10438, "Source Control Provider")),
135
135
  text: `$(${icon.id}) ${activeRepository.repository.provider.name}`,
136
136
  ariaLabel: label,
137
137
  tooltip: label,
@@ -160,8 +160,8 @@ let SCMActiveResourceContextKeyController = class SCMActiveResourceContextKeyCon
160
160
  this.scmService = scmService;
161
161
  this.uriIdentityService = uriIdentityService;
162
162
  this._onDidRepositoryChange = ( new Emitter());
163
- const activeResourceHasChangesContextKey = ( new RawContextKey('scmActiveResourceHasChanges', false, ( localize(10409, "Whether the active resource has changes"))));
164
- const activeResourceRepositoryContextKey = ( new RawContextKey('scmActiveResourceRepository', undefined, ( localize(10410, "The active resource's repository"))));
163
+ const activeResourceHasChangesContextKey = ( new RawContextKey('scmActiveResourceHasChanges', false, ( localize(10439, "Whether the active resource has changes"))));
164
+ const activeResourceRepositoryContextKey = ( new RawContextKey('scmActiveResourceRepository', undefined, ( localize(10440, "The active resource's repository"))));
165
165
  this._repositories = observableFromEvent(this, Event.any(this.scmService.onDidAddRepository, this.scmService.onDidRemoveRepository), () => this.scmService.repositories);
166
166
  this._register(autorun((reader) => {
167
167
  for (const repository of this._repositories.read(reader)) {
@@ -305,7 +305,7 @@ SCMMenus = ( __decorate([
305
305
  ( __param(1, IInstantiationService))
306
306
  ], SCMMenus));
307
307
  MenuRegistry.appendMenuItem(MenuId.SCMResourceContext, {
308
- title: ( localize(10411, "Share")),
308
+ title: ( localize(10441, "Share")),
309
309
  submenu: MenuId.SCMResourceContextShare,
310
310
  group: '45_share',
311
311
  order: 3,
@@ -61,7 +61,7 @@ let QuickDiffDecorator = QuickDiffDecorator_1 = class QuickDiffDecorator extends
61
61
  const gutter = decorations === 'all' || decorations === 'gutter';
62
62
  const overview = decorations === 'all' || decorations === 'overview';
63
63
  const minimap = decorations === 'all' || decorations === 'minimap';
64
- const diffAdded = ( localize(10412, 'Added lines'));
64
+ const diffAdded = ( localize(10442, 'Added lines'));
65
65
  const diffAddedOptions = {
66
66
  gutter,
67
67
  overview: { active: overview, color: overviewRulerAddedForeground },
@@ -72,7 +72,7 @@ let QuickDiffDecorator = QuickDiffDecorator_1 = class QuickDiffDecorator extends
72
72
  this.addedPatternOptions = QuickDiffDecorator_1.createDecoration('dirty-diff-added primary pattern', diffAdded, diffAddedOptions);
73
73
  this.addedSecondaryOptions = QuickDiffDecorator_1.createDecoration('dirty-diff-added secondary', diffAdded, diffAddedOptions);
74
74
  this.addedSecondaryPatternOptions = QuickDiffDecorator_1.createDecoration('dirty-diff-added secondary pattern', diffAdded, diffAddedOptions);
75
- const diffModified = ( localize(10413, 'Changed lines'));
75
+ const diffModified = ( localize(10443, 'Changed lines'));
76
76
  const diffModifiedOptions = {
77
77
  gutter,
78
78
  overview: { active: overview, color: overviewRulerModifiedForeground },
@@ -83,7 +83,7 @@ let QuickDiffDecorator = QuickDiffDecorator_1 = class QuickDiffDecorator extends
83
83
  this.modifiedPatternOptions = QuickDiffDecorator_1.createDecoration('dirty-diff-modified primary pattern', diffModified, diffModifiedOptions);
84
84
  this.modifiedSecondaryOptions = QuickDiffDecorator_1.createDecoration('dirty-diff-modified secondary', diffModified, diffModifiedOptions);
85
85
  this.modifiedSecondaryPatternOptions = QuickDiffDecorator_1.createDecoration('dirty-diff-modified secondary pattern', diffModified, diffModifiedOptions);
86
- const diffDeleted = ( localize(10414, 'Removed lines'));
86
+ const diffDeleted = ( localize(10444, 'Removed lines'));
87
87
  const diffDeletedOptions = {
88
88
  gutter,
89
89
  overview: { active: overview, color: overviewRulerDeletedForeground },
@@ -15,7 +15,7 @@ import { ISplice } from "@codingame/monaco-vscode-api/vscode/vs/base/common/sequ
15
15
  import { IDiffEditorModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/editorCommon";
16
16
  import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
17
17
  import { IProgressService } from "@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service";
18
- import { IChatEditingService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService.service";
18
+ import { IChatEditingService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService.service";
19
19
  import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
20
20
  import { IQuickDiffModelService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/browser/quickDiffModel.service";
21
21
  export interface QuickDiffModelOptions {
@@ -21,8 +21,8 @@ import { toLineChanges } from '@codingame/monaco-vscode-api/vscode/vs/editor/bro
21
21
  import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
22
22
  import { ProgressLocation } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress';
23
23
  import { IProgressService } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service';
24
- import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService';
25
- import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService.service';
24
+ import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService';
25
+ import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService.service';
26
26
  import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
27
27
  import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
28
28
  import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
@@ -314,48 +314,39 @@ let QuickDiffModel = class QuickDiffModel extends Disposable {
314
314
  return this.quickDiffService.getQuickDiffs(uri, this._model.getLanguageId(), isSynchronized);
315
315
  }
316
316
  findNextClosestChange(lineNumber, inclusive = true, providerId) {
317
- const visibleQuickDiffIds = ( this.quickDiffs
318
- .filter(quickDiff => (!providerId || quickDiff.id === providerId) &&
319
- this.quickDiffService.isQuickDiffProviderVisible(quickDiff.id))
320
- .map(quickDiff => quickDiff.id));
321
- if (!inclusive) {
322
- let nextChangeIndex = this.changes
323
- .findIndex(change => visibleQuickDiffIds.includes(change.providerId) &&
324
- change.change.modifiedStartLineNumber > lineNumber);
325
- if (nextChangeIndex !== -1) {
326
- return nextChangeIndex;
317
+ const visibleQuickDiffIds = ( new Set(( this.quickDiffs
318
+ .filter(quickDiff => this.quickDiffService.isQuickDiffProviderVisible(quickDiff.id))
319
+ .map(quickDiff => quickDiff.id))));
320
+ for (let i = 0; i < this.changes.length; i++) {
321
+ if (providerId && this.changes[i].providerId !== providerId) {
322
+ continue;
323
+ }
324
+ if (!( visibleQuickDiffIds.has(this.changes[i].providerId))) {
325
+ continue;
326
+ }
327
+ const change = this.changes[i].change;
328
+ if (inclusive) {
329
+ if (getModifiedEndLineNumber(change) >= lineNumber) {
330
+ return i;
331
+ }
332
+ }
333
+ else {
334
+ if (change.modifiedStartLineNumber > lineNumber) {
335
+ return i;
336
+ }
327
337
  }
328
- nextChangeIndex = this.changes
329
- .findIndex(change => visibleQuickDiffIds.includes(change.providerId));
330
- return nextChangeIndex !== -1 ? nextChangeIndex : 0;
331
- }
332
- const primaryQuickDiffId = this.quickDiffs
333
- .find(quickDiff => quickDiff.kind === 'primary')?.id;
334
- const primaryInclusiveChangeIndex = this.changes
335
- .findIndex(change => change.providerId === primaryQuickDiffId &&
336
- change.change.modifiedStartLineNumber <= lineNumber &&
337
- getModifiedEndLineNumber(change.change) >= lineNumber);
338
- if (primaryInclusiveChangeIndex !== -1) {
339
- return primaryInclusiveChangeIndex;
340
- }
341
- let nextChangeIndex = this.changes
342
- .findIndex(change => visibleQuickDiffIds.includes(change.providerId) &&
343
- change.change.modifiedStartLineNumber <= lineNumber &&
344
- getModifiedEndLineNumber(change.change) >= lineNumber);
345
- if (nextChangeIndex !== -1) {
346
- return nextChangeIndex;
347
338
  }
348
- nextChangeIndex = this.changes
349
- .findIndex(change => visibleQuickDiffIds.includes(change.providerId));
350
- return nextChangeIndex !== -1 ? nextChangeIndex : 0;
339
+ return 0;
351
340
  }
352
341
  findPreviousClosestChange(lineNumber, inclusive = true, providerId) {
342
+ const visibleQuickDiffIds = ( new Set(( this.quickDiffs
343
+ .filter(quickDiff => this.quickDiffService.isQuickDiffProviderVisible(quickDiff.id))
344
+ .map(quickDiff => quickDiff.id))));
353
345
  for (let i = this.changes.length - 1; i >= 0; i--) {
354
346
  if (providerId && this.changes[i].providerId !== providerId) {
355
347
  continue;
356
348
  }
357
- const quickDiff = this.quickDiffs.find(quickDiff => quickDiff.id === this.changes[i].providerId);
358
- if (!quickDiff || !this.quickDiffService.isQuickDiffProviderVisible(quickDiff.id)) {
349
+ if (!( visibleQuickDiffIds.has(this.changes[i].providerId))) {
359
350
  continue;
360
351
  }
361
352
  const change = this.changes[i].change;
@@ -50,6 +50,7 @@ export declare class QuickDiffEditorController extends Disposable implements IEd
50
50
  private onDidChangeGutterAction;
51
51
  canNavigate(): boolean;
52
52
  refresh(): void;
53
+ toggleFocus(): void;
53
54
  next(lineNumber?: number): void;
54
55
  previous(lineNumber?: number): void;
55
56
  close(): void;
@@ -53,7 +53,7 @@ import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/th
53
53
  import { gotoPreviousLocation, gotoNextLocation } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/iconRegistry';
54
54
  import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
55
55
  import { Color } from '@codingame/monaco-vscode-api/vscode/vs/base/common/color';
56
- import { KeyMod, KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
56
+ import { KeyMod, KeyCode, KeyChord } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
57
57
  import { getOuterEditor } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/widget/codeEditor/embeddedCodeEditorWidget';
58
58
  import { quickDiffDecorationCount } from './quickDiffDecorator.js';
59
59
  import { hasNativeContextMenu } from '@codingame/monaco-vscode-api/vscode/vs/platform/window/common/window';
@@ -68,7 +68,7 @@ let QuickDiffPickerViewItem = class QuickDiffPickerViewItem extends SelectAction
68
68
  const peekTitleColor = theme.getColor(peekViewTitleBackground);
69
69
  const opaqueTitleColor = peekTitleColor?.makeOpaque(editorBackgroundColor) ?? editorBackgroundColor;
70
70
  styles.selectBackground = ( ( opaqueTitleColor.lighten(.6)).toString());
71
- super(null, action, [], 0, contextViewService, styles, { ariaLabel: ( localize(10415, 'Switch quick diff base')), useCustomDrawn: !hasNativeContextMenu(configurationService) });
71
+ super(null, action, [], 0, contextViewService, styles, { ariaLabel: ( localize(10445, 'Switch quick diff base')), useCustomDrawn: !hasNativeContextMenu(configurationService) });
72
72
  this.optionsItems = [];
73
73
  }
74
74
  setSelection(quickDiffs, providerId) {
@@ -91,7 +91,7 @@ QuickDiffPickerViewItem = ( __decorate([
91
91
  ], QuickDiffPickerViewItem));
92
92
  class QuickDiffPickerBaseAction extends Action {
93
93
  static { this.ID = 'quickDiff.base.switch'; }
94
- static { this.LABEL = ( localize(10416, "Switch Quick Diff Base")); }
94
+ static { this.LABEL = ( localize(10446, "Switch Quick Diff Base")); }
95
95
  constructor(callback) {
96
96
  super(QuickDiffPickerBaseAction.ID, QuickDiffPickerBaseAction.LABEL, undefined, undefined);
97
97
  this.callback = callback;
@@ -218,14 +218,14 @@ let QuickDiffWidget = class QuickDiffWidget extends PeekViewWidget {
218
218
  .find(quickDiff => quickDiff.id === this._providerId)?.label ?? '';
219
219
  detail = this.model.changes.length > 1
220
220
  ? ( localize(
221
- 10417,
221
+ 10447,
222
222
  "{0} - {1} of {2} changes",
223
223
  label,
224
224
  providerIndex + 1,
225
225
  providerChanges.length
226
226
  ))
227
227
  : ( localize(
228
- 10418,
228
+ 10448,
229
229
  "{0} - {1} of {2} change",
230
230
  label,
231
231
  providerIndex + 1,
@@ -235,8 +235,8 @@ let QuickDiffWidget = class QuickDiffWidget extends PeekViewWidget {
235
235
  }
236
236
  else {
237
237
  detail = this.model.changes.length > 1
238
- ? ( localize(10419, "{0} of {1} changes", providerIndex + 1, providerChanges.length))
239
- : ( localize(10420, "{0} of {1} change", providerIndex + 1, providerChanges.length));
238
+ ? ( localize(10449, "{0} of {1} changes", providerIndex + 1, providerChanges.length))
239
+ : ( localize(10450, "{0} of {1} change", providerIndex + 1, providerChanges.length));
240
240
  this.dropdownContainer.style.display = 'inherit';
241
241
  }
242
242
  this.setTitle(this.title, detail);
@@ -285,7 +285,7 @@ let QuickDiffWidget = class QuickDiffWidget extends PeekViewWidget {
285
285
  this._actionbarWidget.clear();
286
286
  this._actionbarWidget.push(actions.reverse(), { label: false, icon: true });
287
287
  this._actionbarWidget.push([next, previous], { label: false, icon: true });
288
- this._actionbarWidget.push(this._disposables.add(( new Action('peekview.close', ( localize(10421, "Close")), ThemeIcon.asClassName(Codicon.close), true, () => this.dispose()))), { label: false, icon: true });
288
+ this._actionbarWidget.push(this._disposables.add(( new Action('peekview.close', ( localize(10451, "Close")), ThemeIcon.asClassName(Codicon.close), true, () => this.dispose()))), { label: false, icon: true });
289
289
  }
290
290
  updateDropdown() {
291
291
  const quickDiffs = this.getQuickDiffsContainingChange();
@@ -302,8 +302,10 @@ let QuickDiffWidget = class QuickDiffWidget extends PeekViewWidget {
302
302
  }
303
303
  _fillHead(container) {
304
304
  super._fillHead(container, true);
305
+ const action = ( new QuickDiffPickerBaseAction((event) => this.switchQuickDiff(event)));
306
+ this._disposables.add(action);
305
307
  this.dropdownContainer = prepend(this._titleElement, $('.dropdown'));
306
- this.dropdown = this.instantiationService.createInstance(QuickDiffPickerViewItem, ( new QuickDiffPickerBaseAction((event) => this.switchQuickDiff(event))));
308
+ this.dropdown = this.instantiationService.createInstance(QuickDiffPickerViewItem, action);
307
309
  this.dropdown.render(this.dropdownContainer);
308
310
  }
309
311
  _getActionBarOptions() {
@@ -389,9 +391,18 @@ let QuickDiffWidget = class QuickDiffWidget extends PeekViewWidget {
389
391
  hasFocus() {
390
392
  return this.diffEditor.hasTextFocus();
391
393
  }
394
+ toggleFocus() {
395
+ if (this.diffEditor.hasTextFocus()) {
396
+ this.editor.focus();
397
+ }
398
+ else {
399
+ this.diffEditor.focus();
400
+ }
401
+ }
392
402
  dispose() {
393
- super.dispose();
403
+ this.dropdown?.dispose();
394
404
  this.menu?.dispose();
405
+ super.dispose();
395
406
  }
396
407
  };
397
408
  QuickDiffWidget = ( __decorate([
@@ -463,6 +474,11 @@ let QuickDiffEditorController = class QuickDiffEditorController extends Disposab
463
474
  refresh() {
464
475
  this.widget?.showChange(this.widget.index, false);
465
476
  }
477
+ toggleFocus() {
478
+ if (this.widget) {
479
+ this.widget.toggleFocus();
480
+ }
481
+ }
466
482
  next(lineNumber) {
467
483
  if (!this.assertWidget()) {
468
484
  return;
@@ -636,7 +652,7 @@ class ShowPreviousChangeAction extends EditorAction {
636
652
  constructor(outerEditor) {
637
653
  super({
638
654
  id: 'editor.action.dirtydiff.previous',
639
- label: ( localize2(10422, "Show Previous Change")),
655
+ label: ( localize2(10452, "Show Previous Change")),
640
656
  precondition: ( TextCompareEditorActiveContext.toNegated()),
641
657
  kbOpts: { kbExpr: EditorContextKeys.editorTextFocus, primary: KeyMod.Shift | KeyMod.Alt | KeyCode.F3, weight: KeybindingWeight.EditorContrib }
642
658
  });
@@ -662,7 +678,7 @@ class ShowNextChangeAction extends EditorAction {
662
678
  constructor(outerEditor) {
663
679
  super({
664
680
  id: 'editor.action.dirtydiff.next',
665
- label: ( localize2(10423, "Show Next Change")),
681
+ label: ( localize2(10453, "Show Next Change")),
666
682
  precondition: ( TextCompareEditorActiveContext.toNegated()),
667
683
  kbOpts: { kbExpr: EditorContextKeys.editorTextFocus, primary: KeyMod.Alt | KeyCode.F3, weight: KeybindingWeight.EditorContrib }
668
684
  });
@@ -688,7 +704,7 @@ class GotoPreviousChangeAction extends EditorAction {
688
704
  constructor() {
689
705
  super({
690
706
  id: 'workbench.action.editor.previousChange',
691
- label: ( localize2(10424, "Go to Previous Change")),
707
+ label: ( localize2(10454, "Go to Previous Change")),
692
708
  precondition: ( ContextKeyExpr.and(( TextCompareEditorActiveContext.toNegated()), ( quickDiffDecorationCount.notEqualsTo(0)))),
693
709
  kbOpts: { kbExpr: EditorContextKeys.editorTextFocus, primary: KeyMod.Shift | KeyMod.Alt | KeyCode.F5, weight: KeybindingWeight.EditorContrib }
694
710
  });
@@ -723,7 +739,7 @@ class GotoNextChangeAction extends EditorAction {
723
739
  constructor() {
724
740
  super({
725
741
  id: 'workbench.action.editor.nextChange',
726
- label: ( localize2(10425, "Go to Next Change")),
742
+ label: ( localize2(10455, "Go to Next Change")),
727
743
  precondition: ( ContextKeyExpr.and(( TextCompareEditorActiveContext.toNegated()), ( quickDiffDecorationCount.notEqualsTo(0)))),
728
744
  kbOpts: { kbExpr: EditorContextKeys.editorTextFocus, primary: KeyMod.Alt | KeyCode.F5, weight: KeybindingWeight.EditorContrib }
729
745
  });
@@ -758,7 +774,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
758
774
  group: '7_change_nav',
759
775
  command: {
760
776
  id: 'editor.action.dirtydiff.next',
761
- title: ( localize(10426, "Next &&Change"))
777
+ title: ( localize(10456, "Next &&Change"))
762
778
  },
763
779
  order: 1
764
780
  });
@@ -766,7 +782,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
766
782
  group: '7_change_nav',
767
783
  command: {
768
784
  id: 'editor.action.dirtydiff.previous',
769
- title: ( localize(10427, "Previous &&Change"))
785
+ title: ( localize(10457, "Previous &&Change"))
770
786
  },
771
787
  order: 2
772
788
  });
@@ -788,6 +804,23 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
788
804
  controller.close();
789
805
  }
790
806
  });
807
+ KeybindingsRegistry.registerCommandAndKeybindingRule({
808
+ id: 'togglePeekWidgetFocus',
809
+ weight: KeybindingWeight.EditorContrib,
810
+ primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.F2),
811
+ when: isQuickDiffVisible,
812
+ handler: (accessor) => {
813
+ const outerEditor = getOuterEditorFromDiffEditor(accessor);
814
+ if (!outerEditor) {
815
+ return;
816
+ }
817
+ const controller = QuickDiffEditorController.get(outerEditor);
818
+ if (!controller) {
819
+ return;
820
+ }
821
+ controller.toggleFocus();
822
+ }
823
+ });
791
824
  function setPositionAndSelection(change, editor, accessibilityService, codeEditorService) {
792
825
  const position = ( new Position(change.modifiedStartLineNumber, 1));
793
826
  editor.setPosition(position);