monaco-editor-core 0.56.0-dev-20251217 → 0.56.0-dev-20251218

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.
Files changed (186) hide show
  1. package/esm/nls.keys.json +1 -1
  2. package/esm/nls.messages.cs.js +2 -2
  3. package/esm/nls.messages.de.js +2 -2
  4. package/esm/nls.messages.es.js +2 -2
  5. package/esm/nls.messages.fr.js +2 -2
  6. package/esm/nls.messages.it.js +2 -2
  7. package/esm/nls.messages.ja.js +2 -2
  8. package/esm/nls.messages.js +1 -1
  9. package/esm/nls.messages.json +1 -1
  10. package/esm/nls.messages.ko.js +2 -2
  11. package/esm/nls.messages.pl.js +2 -2
  12. package/esm/nls.messages.pt-br.js +2 -2
  13. package/esm/nls.messages.ru.js +2 -2
  14. package/esm/nls.messages.tr.js +2 -2
  15. package/esm/nls.messages.zh-cn.js +2 -2
  16. package/esm/nls.messages.zh-tw.js +2 -2
  17. package/esm/nls.metadata.json +4 -2
  18. package/esm/vs/base/browser/ui/actionbar/actionViewItems.js.map +1 -1
  19. package/esm/vs/base/browser/ui/findinput/findInput.js +6 -1
  20. package/esm/vs/base/browser/ui/findinput/findInput.js.map +1 -1
  21. package/esm/vs/base/browser/ui/inputbox/inputBox.js +17 -1
  22. package/esm/vs/base/browser/ui/inputbox/inputBox.js.map +1 -1
  23. package/esm/vs/base/browser/ui/toggle/toggle.js +78 -6
  24. package/esm/vs/base/browser/ui/toggle/toggle.js.map +1 -1
  25. package/esm/vs/editor/browser/services/editorWorkerService.js +6 -2
  26. package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
  27. package/esm/vs/editor/common/config/editorConfigurationSchema.js +49 -47
  28. package/esm/vs/editor/common/config/editorConfigurationSchema.js.map +1 -1
  29. package/esm/vs/editor/common/config/editorOptions.js +410 -410
  30. package/esm/vs/editor/common/core/editorColorRegistry.js +69 -69
  31. package/esm/vs/editor/common/editorContextKeys.js +47 -47
  32. package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
  33. package/esm/vs/editor/common/languages.js +56 -56
  34. package/esm/vs/editor/common/model/editStack.js +1 -1
  35. package/esm/vs/editor/common/standaloneStrings.js +11 -11
  36. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
  37. package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
  38. package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
  39. package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
  40. package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
  41. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +17 -17
  42. package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
  43. package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
  44. package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
  45. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
  46. package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
  47. package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
  48. package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
  49. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
  50. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
  51. package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +1 -1
  52. package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
  53. package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
  54. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +10 -10
  55. package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
  56. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
  57. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +9 -9
  58. package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
  59. package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
  60. package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
  61. package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
  62. package/esm/vs/editor/contrib/find/browser/findController.js +16 -16
  63. package/esm/vs/editor/contrib/find/browser/findWidget.js +26 -26
  64. package/esm/vs/editor/contrib/folding/browser/folding.js +20 -20
  65. package/esm/vs/editor/contrib/folding/browser/folding.js.map +1 -1
  66. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
  67. package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
  68. package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
  69. package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
  70. package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
  71. package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
  72. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
  73. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
  74. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
  75. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
  76. package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
  77. package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
  78. package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
  79. package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
  80. package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
  81. package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js +2 -2
  82. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +9 -9
  83. package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
  84. package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
  85. package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
  86. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
  87. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +21 -21
  88. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +13 -13
  89. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +1 -1
  90. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
  91. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
  92. package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +2 -2
  93. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +6 -6
  94. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +1 -1
  95. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +3 -3
  96. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
  97. package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
  98. package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  99. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +31 -31
  100. package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
  101. package/esm/vs/editor/contrib/links/browser/links.js +10 -10
  102. package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
  103. package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
  104. package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
  105. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
  106. package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
  107. package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
  108. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +25 -27
  109. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js.map +1 -1
  110. package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
  111. package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
  112. package/esm/vs/editor/contrib/rename/browser/rename.js +11 -11
  113. package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
  114. package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
  115. package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
  116. package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  117. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  118. package/esm/vs/editor/contrib/suggest/browser/suggest.js +9 -9
  119. package/esm/vs/editor/contrib/suggest/browser/suggestController.js +11 -11
  120. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +17 -17
  121. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
  122. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
  123. package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
  124. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  125. package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  126. package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  127. package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
  128. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
  129. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
  130. package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  131. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
  132. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +3 -3
  133. package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
  134. package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
  135. package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
  136. package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
  137. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
  138. package/esm/vs/platform/actions/browser/toolbar.js +2 -2
  139. package/esm/vs/platform/actions/common/menuService.js +2 -2
  140. package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
  141. package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
  142. package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
  143. package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
  144. package/esm/vs/platform/contextkey/common/scanner.js +5 -5
  145. package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  146. package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
  147. package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
  148. package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
  149. package/esm/vs/platform/list/browser/listService.js +27 -27
  150. package/esm/vs/platform/markers/common/markerService.js +2 -2
  151. package/esm/vs/platform/markers/common/markers.js +6 -6
  152. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +8 -8
  153. package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
  154. package/esm/vs/platform/quickinput/browser/media/quickInput.css +38 -4
  155. package/esm/vs/platform/quickinput/browser/quickInput.js +42 -14
  156. package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
  157. package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
  158. package/esm/vs/platform/quickinput/browser/quickInputBox.js +13 -1
  159. package/esm/vs/platform/quickinput/browser/quickInputBox.js.map +1 -1
  160. package/esm/vs/platform/quickinput/browser/quickInputController.js +22 -12
  161. package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
  162. package/esm/vs/platform/quickinput/browser/quickInputList.js +17 -12
  163. package/esm/vs/platform/quickinput/browser/quickInputList.js.map +1 -1
  164. package/esm/vs/platform/quickinput/browser/quickInputUtils.js +36 -8
  165. package/esm/vs/platform/quickinput/browser/quickInputUtils.js.map +1 -1
  166. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  167. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js +3 -3
  168. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js.map +1 -1
  169. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js +8 -4
  170. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js.map +1 -1
  171. package/esm/vs/platform/quickinput/common/quickInput.js.map +1 -1
  172. package/esm/vs/platform/theme/common/colorUtils.js +2 -2
  173. package/esm/vs/platform/theme/common/colors/baseColors.js +18 -18
  174. package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
  175. package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
  176. package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
  177. package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
  178. package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
  179. package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
  180. package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
  181. package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
  182. package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
  183. package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
  184. package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
  185. package/esm/vs/platform/workspace/common/workspace.js +1 -1
  186. package/package.json +2 -2
@@ -2,12 +2,11 @@
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Licensed under the MIT License. See License.txt in the project root for license information.
4
4
  *--------------------------------------------------------------------------------------------*/
5
- import { Toggle } from '../../../../base/browser/ui/toggle/toggle.js';
6
5
  import { Codicon } from '../../../../base/common/codicons.js';
7
6
  import { Disposable, DisposableStore, toDisposable } from '../../../../base/common/lifecycle.js';
7
+ import { ThemeIcon } from '../../../../base/common/themables.js';
8
8
  import { localize } from '../../../../nls.js';
9
- import { inputActiveOptionBackground, inputActiveOptionBorder, inputActiveOptionForeground } from '../../../../platform/theme/common/colors/inputColors.js';
10
- import { asCssVariable } from '../../../../platform/theme/common/colorUtils.js';
9
+ import { QuickInputButtonLocation } from '../../../../platform/quickinput/common/quickInput.js';
11
10
  import { getCodeEditor } from '../../../browser/editorBrowser.js';
12
11
  import { AbstractEditorNavigationQuickAccessProvider } from './editorNavigationQuickAccess.js';
13
12
  export class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigationQuickAccessProvider {
@@ -24,7 +23,7 @@ export class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigatio
24
23
  this.storageService.store(AbstractGotoLineQuickAccessProvider.ZERO_BASED_OFFSET_STORAGE_KEY, value, -1 /* StorageScope.APPLICATION */, 0 /* StorageTarget.USER */);
25
24
  }
26
25
  provideWithoutTextEditor(picker) {
27
- const label = localize(1348, "Open a text editor first to go to a line or an offset.");
26
+ const label = localize(1349, "Open a text editor first to go to a line or an offset.");
28
27
  picker.items = [{ label }];
29
28
  picker.ariaLabel = label;
30
29
  return Disposable.None;
@@ -45,12 +44,19 @@ export class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigatio
45
44
  }
46
45
  }
47
46
  }));
47
+ // Add a toggle to switch between 1- and 0-based offsets.
48
+ const offsetButton = {
49
+ iconClass: ThemeIcon.asClassName(Codicon.indexZero),
50
+ tooltip: localize(1350, "Toggle Zero-Based Offset"),
51
+ location: QuickInputButtonLocation.Input,
52
+ toggle: { checked: this.useZeroBasedOffset }
53
+ };
48
54
  // React to picker changes
49
55
  const updatePickerAndEditor = () => {
50
56
  const inputText = picker.value.trim().substring(AbstractGotoLineQuickAccessProvider.GO_TO_LINE_PREFIX.length);
51
57
  const { inOffsetMode, lineNumber, column, label } = this.parsePosition(editor, inputText);
52
58
  // Show toggle only when input text starts with '::'.
53
- toggle.visible = !!inOffsetMode;
59
+ picker.buttons = inOffsetMode ? [offsetButton] : [];
54
60
  // Picker
55
61
  picker.items = [{
56
62
  lineNumber,
@@ -59,7 +65,7 @@ export class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigatio
59
65
  }];
60
66
  // ARIA Label
61
67
  const cursor = editor.getPosition() ?? { lineNumber: 1, column: 1 };
62
- picker.ariaLabel = localize(1349, "Current position: line {0}, column {1}. {2}", cursor.lineNumber, cursor.column, label);
68
+ picker.ariaLabel = localize(1351, "Current position: line {0}, column {1}. {2}", cursor.lineNumber, cursor.column, label);
63
69
 
64
70
 
65
71
 
@@ -74,20 +80,12 @@ export class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigatio
74
80
  // Decorate
75
81
  this.addDecorations(editor, range);
76
82
  };
77
- // Add a toggle to switch between 1- and 0-based offsets.
78
- const toggle = new Toggle({
79
- title: localize(1350, "Use Zero-Based Offset"),
80
- icon: Codicon.indexZero,
81
- isChecked: this.useZeroBasedOffset,
82
- inputActiveOptionBorder: asCssVariable(inputActiveOptionBorder),
83
- inputActiveOptionForeground: asCssVariable(inputActiveOptionForeground),
84
- inputActiveOptionBackground: asCssVariable(inputActiveOptionBackground)
85
- });
86
- disposables.add(toggle.onChange(() => {
87
- this.useZeroBasedOffset = !this.useZeroBasedOffset;
88
- updatePickerAndEditor();
83
+ disposables.add(picker.onDidTriggerButton(button => {
84
+ if (button === offsetButton) {
85
+ this.useZeroBasedOffset = button.toggle?.checked ?? !this.useZeroBasedOffset;
86
+ updatePickerAndEditor();
87
+ }
89
88
  }));
90
- picker.toggles = [toggle];
91
89
  updatePickerAndEditor();
92
90
  disposables.add(picker.onDidChangeValue(() => updatePickerAndEditor()));
93
91
  // Adjust line number visibility as needed
@@ -114,7 +112,7 @@ export class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigatio
114
112
  const model = this.getModel(editor);
115
113
  if (!model) {
116
114
  return {
117
- label: localize(1351, "Open a text editor first to go to a line or an offset.")
115
+ label: localize(1352, "Open a text editor first to go to a line or an offset.")
118
116
  };
119
117
  }
120
118
  // Support ::<offset> notation to navigate to a specific offset in the model.
@@ -126,8 +124,8 @@ export class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigatio
126
124
  return {
127
125
  inOffsetMode: true,
128
126
  label: this.useZeroBasedOffset ?
129
- localize(1352, "Type a character position to go to (from 0 to {0}).", maxOffset - 1) :
130
- localize(1353, "Type a character position to go to (from 1 to {0}).", maxOffset)
127
+ localize(1353, "Type a character position to go to (from 0 to {0}).", maxOffset - 1) :
128
+ localize(1354, "Type a character position to go to (from 1 to {0}).", maxOffset)
131
129
  };
132
130
  }
133
131
  else {
@@ -144,7 +142,7 @@ export class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigatio
144
142
  return {
145
143
  ...pos,
146
144
  inOffsetMode: true,
147
- label: localize(1354, "Press 'Enter' to go to line {0} at column {1}.", pos.lineNumber, pos.column)
145
+ label: localize(1355, "Press 'Enter' to go to line {0} at column {1}.", pos.lineNumber, pos.column)
148
146
  };
149
147
  }
150
148
  }
@@ -155,7 +153,7 @@ export class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigatio
155
153
  let lineNumber = parseInt(parts[0]?.trim(), 10);
156
154
  if (parts.length < 1 || isNaN(lineNumber)) {
157
155
  return {
158
- label: localize(1355, "Type a line number to go to (from 1 to {0}).", maxLine)
156
+ label: localize(1356, "Type a line number to go to (from 1 to {0}).", maxLine)
159
157
  };
160
158
  }
161
159
  // Handle negative line numbers and clip to valid range.
@@ -168,8 +166,8 @@ export class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigatio
168
166
  lineNumber,
169
167
  column: 1,
170
168
  label: parts.length < 2 ?
171
- localize(1356, "Press 'Enter' to go to line {0} or enter colon : to add a column number.", lineNumber) :
172
- localize(1357, "Press 'Enter' to go to line {0} or enter a column number (from 1 to {1}).", lineNumber, maxColumn)
169
+ localize(1357, "Press 'Enter' to go to line {0} or enter colon : to add a column number.", lineNumber) :
170
+ localize(1358, "Press 'Enter' to go to line {0} or enter a column number (from 1 to {1}).", lineNumber, maxColumn)
173
171
  };
174
172
  }
175
173
  // Handle negative column numbers and clip to valid range.
@@ -178,7 +176,7 @@ export class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigatio
178
176
  return {
179
177
  lineNumber,
180
178
  column,
181
- label: localize(1358, "Press 'Enter' to go to line {0} at column {1}.", lineNumber, column)
179
+ label: localize(1359, "Press 'Enter' to go to line {0} at column {1}.", lineNumber, column)
182
180
  };
183
181
  }
184
182
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,MAAM,EAAE,MAAM,8CAA8C,CAAC;AAEtE,OAAO,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,eAAe,EAAe,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC9G,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG9C,OAAO,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,yDAAyD,CAAC;AAC5J,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAKlE,OAAO,EAAE,2CAA2C,EAAiC,MAAM,kCAAkC,CAAC;AAI9H,MAAM,OAAgB,mCAAoC,SAAQ,2CAA2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AAG,KAAK,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;YACrD,IAAI,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;YAC5C,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;gBACvC,OAAO;oBACN,UAAU;oBACV,MAAM,EAAE,CAAC;oBACT,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;wBACxB,QAAQ,CAAC,IAA2B,EAAE,0EAA0E,EAAE,UAAU,CAAC,CAAC,CAAC;wBAC/H,QAAQ,CAAC,IAAuB,EAAE,2EAA2E,EAAE,UAAU,EAAE,SAAS,CAAC;iBACtI,CAAC;YACH,CAAC;YAED,0DAA0D;YAC1D,MAAM,GAAG,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,GAAG,MAAM,CAAC;YACnD,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,SAAS,CAAC,CAAC;YAElD,OAAO;gBACN,UAAU;gBACV,MAAM;gBACN,KAAK,EAAE,QAAQ,CAAC,IAAuB,EAAE,gDAAgD,EAAE,UAAU,EAAE,MAAM,CAAC;aAC9G,CAAC;QACH,CAAC;IACF,CAAC","file":"gotoLineQuickAccess.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { Toggle } from '../../../../base/browser/ui/toggle/toggle.js';\nimport { CancellationToken } from '../../../../base/common/cancellation.js';\nimport { Codicon } from '../../../../base/common/codicons.js';\nimport { Disposable, DisposableStore, IDisposable, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { localize } from '../../../../nls.js';\nimport { IQuickPick, IQuickPickItem } from '../../../../platform/quickinput/common/quickInput.js';\nimport { IStorageService, StorageScope, StorageTarget } from '../../../../platform/storage/common/storage.js';\nimport { inputActiveOptionBackground, inputActiveOptionBorder, inputActiveOptionForeground } from '../../../../platform/theme/common/colors/inputColors.js';\nimport { asCssVariable } from '../../../../platform/theme/common/colorUtils.js';\nimport { getCodeEditor } from '../../../browser/editorBrowser.js';\nimport { EditorOption, RenderLineNumbersType } from '../../../common/config/editorOptions.js';\nimport { IPosition } from '../../../common/core/position.js';\nimport { IRange } from '../../../common/core/range.js';\nimport { IEditor, ScrollType } from '../../../common/editorCommon.js';\nimport { AbstractEditorNavigationQuickAccessProvider, IQuickAccessTextEditorContext } from './editorNavigationQuickAccess.js';\n\ninterface IGotoLineQuickPickItem extends IQuickPickItem, Partial<IPosition> { }\n\nexport abstract class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigationQuickAccessProvider {\n\n\tstatic readonly GO_TO_LINE_PREFIX = ':';\n\tstatic readonly GO_TO_OFFSET_PREFIX = '::';\n\tprivate static readonly ZERO_BASED_OFFSET_STORAGE_KEY = 'gotoLine.useZeroBasedOffset';\n\n\tconstructor() {\n\t\tsuper({ canAcceptInBackground: true });\n\t}\n\n\tprotected abstract readonly storageService: IStorageService;\n\n\tprivate get useZeroBasedOffset() {\n\t\treturn this.storageService.getBoolean(\n\t\t\tAbstractGotoLineQuickAccessProvider.ZERO_BASED_OFFSET_STORAGE_KEY,\n\t\t\tStorageScope.APPLICATION,\n\t\t\tfalse);\n\t}\n\n\tprivate set useZeroBasedOffset(value: boolean) {\n\t\tthis.storageService.store(\n\t\t\tAbstractGotoLineQuickAccessProvider.ZERO_BASED_OFFSET_STORAGE_KEY,\n\t\t\tvalue,\n\t\t\tStorageScope.APPLICATION,\n\t\t\tStorageTarget.USER);\n\t}\n\n\tprotected provideWithoutTextEditor(picker: IQuickPick<IGotoLineQuickPickItem, { useSeparators: true }>): IDisposable {\n\t\tconst label = localize('gotoLine.noEditor', \"Open a text editor first to go to a line or an offset.\");\n\n\t\tpicker.items = [{ label }];\n\t\tpicker.ariaLabel = label;\n\n\t\treturn Disposable.None;\n\t}\n\n\tprotected provideWithTextEditor(context: IQuickAccessTextEditorContext, picker: IQuickPick<IGotoLineQuickPickItem, { useSeparators: true }>, token: CancellationToken): IDisposable {\n\t\tconst editor = context.editor;\n\t\tconst disposables = new DisposableStore();\n\n\t\t// Goto line once picked\n\t\tdisposables.add(picker.onDidAccept(event => {\n\t\t\tconst [item] = picker.selectedItems;\n\t\t\tif (item) {\n\t\t\t\tif (!item.lineNumber) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.gotoLocation(context, { range: this.toRange(item.lineNumber, item.column), keyMods: picker.keyMods, preserveFocus: event.inBackground });\n\n\t\t\t\tif (!event.inBackground) {\n\t\t\t\t\tpicker.hide();\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\t// React to picker changes\n\t\tconst updatePickerAndEditor = () => {\n\t\t\tconst inputText = picker.value.trim().substring(AbstractGotoLineQuickAccessProvider.GO_TO_LINE_PREFIX.length);\n\t\t\tconst { inOffsetMode, lineNumber, column, label } = this.parsePosition(editor, inputText);\n\n\t\t\t// Show toggle only when input text starts with '::'.\n\t\t\ttoggle.visible = !!inOffsetMode;\n\n\t\t\t// Picker\n\t\t\tpicker.items = [{\n\t\t\t\tlineNumber,\n\t\t\t\tcolumn,\n\t\t\t\tlabel,\n\t\t\t}];\n\n\t\t\t// ARIA Label\n\t\t\tconst cursor = editor.getPosition() ?? { lineNumber: 1, column: 1 };\n\t\t\tpicker.ariaLabel = localize(\n\t\t\t\t{\n\t\t\t\t\tkey: 'gotoLine.ariaLabel',\n\t\t\t\t\tcomment: ['{0} is the line number, {1} is the column number, {2} is instructions for typing in the Go To Line picker']\n\t\t\t\t},\n\t\t\t\t\"Current position: line {0}, column {1}. {2}\", cursor.lineNumber, cursor.column, label\n\t\t\t);\n\n\t\t\t// Clear decorations for invalid range\n\t\t\tif (!lineNumber) {\n\t\t\t\tthis.clearDecorations(editor);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Reveal\n\t\t\tconst range = this.toRange(lineNumber, column);\n\t\t\teditor.revealRangeInCenter(range, ScrollType.Smooth);\n\n\t\t\t// Decorate\n\t\t\tthis.addDecorations(editor, range);\n\t\t};\n\n\t\t// Add a toggle to switch between 1- and 0-based offsets.\n\t\tconst toggle = new Toggle({\n\t\t\ttitle: localize('gotoLineToggle', \"Use Zero-Based Offset\"),\n\t\t\ticon: Codicon.indexZero,\n\t\t\tisChecked: this.useZeroBasedOffset,\n\t\t\tinputActiveOptionBorder: asCssVariable(inputActiveOptionBorder),\n\t\t\tinputActiveOptionForeground: asCssVariable(inputActiveOptionForeground),\n\t\t\tinputActiveOptionBackground: asCssVariable(inputActiveOptionBackground)\n\t\t});\n\n\t\tdisposables.add(\n\t\t\ttoggle.onChange(() => {\n\t\t\t\tthis.useZeroBasedOffset = !this.useZeroBasedOffset;\n\t\t\t\tupdatePickerAndEditor();\n\t\t\t}));\n\n\t\tpicker.toggles = [toggle];\n\n\t\tupdatePickerAndEditor();\n\t\tdisposables.add(picker.onDidChangeValue(() => updatePickerAndEditor()));\n\n\t\t// Adjust line number visibility as needed\n\t\tconst codeEditor = getCodeEditor(editor);\n\t\tif (codeEditor) {\n\t\t\tconst options = codeEditor.getOptions();\n\t\t\tconst lineNumbers = options.get(EditorOption.lineNumbers);\n\t\t\tif (lineNumbers.renderType === RenderLineNumbersType.Relative) {\n\t\t\t\tcodeEditor.updateOptions({ lineNumbers: 'on' });\n\n\t\t\t\tdisposables.add(toDisposable(() => codeEditor.updateOptions({ lineNumbers: 'relative' })));\n\t\t\t}\n\t\t}\n\n\t\treturn disposables;\n\t}\n\n\tprivate toRange(lineNumber = 1, column = 1): IRange {\n\t\treturn {\n\t\t\tstartLineNumber: lineNumber,\n\t\t\tstartColumn: column,\n\t\t\tendLineNumber: lineNumber,\n\t\t\tendColumn: column\n\t\t};\n\t}\n\n\tprotected parsePosition(editor: IEditor, value: string): Partial<IPosition> & { inOffsetMode?: boolean; label: string } {\n\t\tconst model = this.getModel(editor);\n\t\tif (!model) {\n\t\t\treturn {\n\t\t\t\tlabel: localize('gotoLine.noEditor', \"Open a text editor first to go to a line or an offset.\")\n\t\t\t};\n\t\t}\n\n\t\t// Support ::<offset> notation to navigate to a specific offset in the model.\n\t\tif (value.startsWith(':')) {\n\t\t\tlet offset = parseInt(value.substring(1), 10);\n\t\t\tconst maxOffset = model.getValueLength();\n\t\t\tif (isNaN(offset)) {\n\t\t\t\t// No valid offset specified.\n\t\t\t\treturn {\n\t\t\t\t\tinOffsetMode: true,\n\t\t\t\t\tlabel: this.useZeroBasedOffset ?\n\t\t\t\t\t\tlocalize('gotoLine.offsetPromptZero', \"Type a character position to go to (from 0 to {0}).\", maxOffset - 1) :\n\t\t\t\t\t\tlocalize('gotoLine.offsetPrompt', \"Type a character position to go to (from 1 to {0}).\", maxOffset)\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tconst reverse = offset < 0;\n\t\t\t\tif (!this.useZeroBasedOffset) {\n\t\t\t\t\t// Convert 1-based offset to model's 0-based.\n\t\t\t\t\toffset -= Math.sign(offset);\n\t\t\t\t}\n\t\t\t\tif (reverse) {\n\t\t\t\t\t// Offset from the end of the buffer\n\t\t\t\t\toffset += maxOffset;\n\t\t\t\t}\n\t\t\t\tconst pos = model.getPositionAt(offset);\n\t\t\t\treturn {\n\t\t\t\t\t...pos,\n\t\t\t\t\tinOffsetMode: true,\n\t\t\t\t\tlabel: localize('gotoLine.goToPosition', \"Press 'Enter' to go to line {0} at column {1}.\", pos.lineNumber, pos.column)\n\t\t\t\t};\n\t\t\t}\n\t\t} else {\n\t\t\t// Support line-col formats of `line,col`, `line:col`, `line#col`\n\t\t\tconst parts = value.split(/,|:|#/);\n\n\t\t\tconst maxLine = model.getLineCount();\n\t\t\tlet lineNumber = parseInt(parts[0]?.trim(), 10);\n\t\t\tif (parts.length < 1 || isNaN(lineNumber)) {\n\t\t\t\treturn {\n\t\t\t\t\tlabel: localize('gotoLine.linePrompt', \"Type a line number to go to (from 1 to {0}).\", maxLine)\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Handle negative line numbers and clip to valid range.\n\t\t\tlineNumber = lineNumber >= 0 ? lineNumber : (maxLine + 1) + lineNumber;\n\t\t\tlineNumber = Math.min(Math.max(1, lineNumber), maxLine);\n\n\t\t\tconst maxColumn = model.getLineMaxColumn(lineNumber);\n\t\t\tlet column = parseInt(parts[1]?.trim(), 10);\n\t\t\tif (parts.length < 2 || isNaN(column)) {\n\t\t\t\treturn {\n\t\t\t\t\tlineNumber,\n\t\t\t\t\tcolumn: 1,\n\t\t\t\t\tlabel: parts.length < 2 ?\n\t\t\t\t\t\tlocalize('gotoLine.lineColumnPrompt', \"Press 'Enter' to go to line {0} or enter colon : to add a column number.\", lineNumber) :\n\t\t\t\t\t\tlocalize('gotoLine.columnPrompt', \"Press 'Enter' to go to line {0} or enter a column number (from 1 to {1}).\", lineNumber, maxColumn)\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Handle negative column numbers and clip to valid range.\n\t\t\tcolumn = column >= 0 ? column : maxColumn + column;\n\t\t\tcolumn = Math.min(Math.max(1, column), maxColumn);\n\n\t\t\treturn {\n\t\t\t\tlineNumber,\n\t\t\t\tcolumn,\n\t\t\t\tlabel: localize('gotoLine.goToPosition', \"Press 'Enter' to go to line {0} at column {1}.\", lineNumber, column)\n\t\t\t};\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"sources":["vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAGhG,OAAO,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,eAAe,EAAe,YAAY,EAAE,MAAM,sCAAsC,CAAC;A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C","file":"gotoLineQuickAccess.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { CancellationToken } from '../../../../base/common/cancellation.js';\nimport { Codicon } from '../../../../base/common/codicons.js';\nimport { Disposable, DisposableStore, IDisposable, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { ThemeIcon } from '../../../../base/common/themables.js';\nimport { localize } from '../../../../nls.js';\nimport { IQuickInputButton, IQuickPick, IQuickPickItem, QuickInputButtonLocation } from '../../../../platform/quickinput/common/quickInput.js';\nimport { IStorageService, StorageScope, StorageTarget } from '../../../../platform/storage/common/storage.js';\nimport { getCodeEditor } from '../../../browser/editorBrowser.js';\nimport { EditorOption, RenderLineNumbersType } from '../../../common/config/editorOptions.js';\nimport { IPosition } from '../../../common/core/position.js';\nimport { IRange } from '../../../common/core/range.js';\nimport { IEditor, ScrollType } from '../../../common/editorCommon.js';\nimport { AbstractEditorNavigationQuickAccessProvider, IQuickAccessTextEditorContext } from './editorNavigationQuickAccess.js';\n\ninterface IGotoLineQuickPickItem extends IQuickPickItem, Partial<IPosition> { }\n\nexport abstract class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigationQuickAccessProvider {\n\n\tstatic readonly GO_TO_LINE_PREFIX = ':';\n\tstatic readonly GO_TO_OFFSET_PREFIX = '::';\n\tprivate static readonly ZERO_BASED_OFFSET_STORAGE_KEY = 'gotoLine.useZeroBasedOffset';\n\n\tconstructor() {\n\t\tsuper({ canAcceptInBackground: true });\n\t}\n\n\tprotected abstract readonly storageService: IStorageService;\n\n\tprivate get useZeroBasedOffset() {\n\t\treturn this.storageService.getBoolean(\n\t\t\tAbstractGotoLineQuickAccessProvider.ZERO_BASED_OFFSET_STORAGE_KEY,\n\t\t\tStorageScope.APPLICATION,\n\t\t\tfalse);\n\t}\n\n\tprivate set useZeroBasedOffset(value: boolean) {\n\t\tthis.storageService.store(\n\t\t\tAbstractGotoLineQuickAccessProvider.ZERO_BASED_OFFSET_STORAGE_KEY,\n\t\t\tvalue,\n\t\t\tStorageScope.APPLICATION,\n\t\t\tStorageTarget.USER);\n\t}\n\n\tprotected provideWithoutTextEditor(picker: IQuickPick<IGotoLineQuickPickItem, { useSeparators: true }>): IDisposable {\n\t\tconst label = localize('gotoLine.noEditor', \"Open a text editor first to go to a line or an offset.\");\n\n\t\tpicker.items = [{ label }];\n\t\tpicker.ariaLabel = label;\n\n\t\treturn Disposable.None;\n\t}\n\n\tprotected provideWithTextEditor(context: IQuickAccessTextEditorContext, picker: IQuickPick<IGotoLineQuickPickItem, { useSeparators: true }>, token: CancellationToken): IDisposable {\n\t\tconst editor = context.editor;\n\t\tconst disposables = new DisposableStore();\n\n\t\t// Goto line once picked\n\t\tdisposables.add(picker.onDidAccept(event => {\n\t\t\tconst [item] = picker.selectedItems;\n\t\t\tif (item) {\n\t\t\t\tif (!item.lineNumber) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.gotoLocation(context, { range: this.toRange(item.lineNumber, item.column), keyMods: picker.keyMods, preserveFocus: event.inBackground });\n\n\t\t\t\tif (!event.inBackground) {\n\t\t\t\t\tpicker.hide();\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\t// Add a toggle to switch between 1- and 0-based offsets.\n\t\tconst offsetButton: IQuickInputButton = {\n\t\t\ticonClass: ThemeIcon.asClassName(Codicon.indexZero),\n\t\t\ttooltip: localize('gotoLineToggleButton', \"Toggle Zero-Based Offset\"),\n\t\t\tlocation: QuickInputButtonLocation.Input,\n\t\t\ttoggle: { checked: this.useZeroBasedOffset }\n\t\t};\n\n\t\t// React to picker changes\n\t\tconst updatePickerAndEditor = () => {\n\t\t\tconst inputText = picker.value.trim().substring(AbstractGotoLineQuickAccessProvider.GO_TO_LINE_PREFIX.length);\n\t\t\tconst { inOffsetMode, lineNumber, column, label } = this.parsePosition(editor, inputText);\n\n\t\t\t// Show toggle only when input text starts with '::'.\n\t\t\tpicker.buttons = inOffsetMode ? [offsetButton] : [];\n\n\t\t\t// Picker\n\t\t\tpicker.items = [{\n\t\t\t\tlineNumber,\n\t\t\t\tcolumn,\n\t\t\t\tlabel,\n\t\t\t}];\n\n\t\t\t// ARIA Label\n\t\t\tconst cursor = editor.getPosition() ?? { lineNumber: 1, column: 1 };\n\t\t\tpicker.ariaLabel = localize(\n\t\t\t\t{\n\t\t\t\t\tkey: 'gotoLine.ariaLabel',\n\t\t\t\t\tcomment: ['{0} is the line number, {1} is the column number, {2} is instructions for typing in the Go To Line picker']\n\t\t\t\t},\n\t\t\t\t\"Current position: line {0}, column {1}. {2}\", cursor.lineNumber, cursor.column, label\n\t\t\t);\n\n\t\t\t// Clear decorations for invalid range\n\t\t\tif (!lineNumber) {\n\t\t\t\tthis.clearDecorations(editor);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Reveal\n\t\t\tconst range = this.toRange(lineNumber, column);\n\t\t\teditor.revealRangeInCenter(range, ScrollType.Smooth);\n\n\t\t\t// Decorate\n\t\t\tthis.addDecorations(editor, range);\n\t\t};\n\n\t\tdisposables.add(picker.onDidTriggerButton(button => {\n\t\t\tif (button === offsetButton) {\n\t\t\t\tthis.useZeroBasedOffset = button.toggle?.checked ?? !this.useZeroBasedOffset;\n\t\t\t\tupdatePickerAndEditor();\n\t\t\t}\n\t\t}));\n\n\t\tupdatePickerAndEditor();\n\t\tdisposables.add(picker.onDidChangeValue(() => updatePickerAndEditor()));\n\n\t\t// Adjust line number visibility as needed\n\t\tconst codeEditor = getCodeEditor(editor);\n\t\tif (codeEditor) {\n\t\t\tconst options = codeEditor.getOptions();\n\t\t\tconst lineNumbers = options.get(EditorOption.lineNumbers);\n\t\t\tif (lineNumbers.renderType === RenderLineNumbersType.Relative) {\n\t\t\t\tcodeEditor.updateOptions({ lineNumbers: 'on' });\n\n\t\t\t\tdisposables.add(toDisposable(() => codeEditor.updateOptions({ lineNumbers: 'relative' })));\n\t\t\t}\n\t\t}\n\n\t\treturn disposables;\n\t}\n\n\tprivate toRange(lineNumber = 1, column = 1): IRange {\n\t\treturn {\n\t\t\tstartLineNumber: lineNumber,\n\t\t\tstartColumn: column,\n\t\t\tendLineNumber: lineNumber,\n\t\t\tendColumn: column\n\t\t};\n\t}\n\n\tprotected parsePosition(editor: IEditor, value: string): Partial<IPosition> & { inOffsetMode?: boolean; label: string } {\n\t\tconst model = this.getModel(editor);\n\t\tif (!model) {\n\t\t\treturn {\n\t\t\t\tlabel: localize('gotoLine.noEditor', \"Open a text editor first to go to a line or an offset.\")\n\t\t\t};\n\t\t}\n\n\t\t// Support ::<offset> notation to navigate to a specific offset in the model.\n\t\tif (value.startsWith(':')) {\n\t\t\tlet offset = parseInt(value.substring(1), 10);\n\t\t\tconst maxOffset = model.getValueLength();\n\t\t\tif (isNaN(offset)) {\n\t\t\t\t// No valid offset specified.\n\t\t\t\treturn {\n\t\t\t\t\tinOffsetMode: true,\n\t\t\t\t\tlabel: this.useZeroBasedOffset ?\n\t\t\t\t\t\tlocalize('gotoLine.offsetPromptZero', \"Type a character position to go to (from 0 to {0}).\", maxOffset - 1) :\n\t\t\t\t\t\tlocalize('gotoLine.offsetPrompt', \"Type a character position to go to (from 1 to {0}).\", maxOffset)\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tconst reverse = offset < 0;\n\t\t\t\tif (!this.useZeroBasedOffset) {\n\t\t\t\t\t// Convert 1-based offset to model's 0-based.\n\t\t\t\t\toffset -= Math.sign(offset);\n\t\t\t\t}\n\t\t\t\tif (reverse) {\n\t\t\t\t\t// Offset from the end of the buffer\n\t\t\t\t\toffset += maxOffset;\n\t\t\t\t}\n\t\t\t\tconst pos = model.getPositionAt(offset);\n\t\t\t\treturn {\n\t\t\t\t\t...pos,\n\t\t\t\t\tinOffsetMode: true,\n\t\t\t\t\tlabel: localize('gotoLine.goToPosition', \"Press 'Enter' to go to line {0} at column {1}.\", pos.lineNumber, pos.column)\n\t\t\t\t};\n\t\t\t}\n\t\t} else {\n\t\t\t// Support line-col formats of `line,col`, `line:col`, `line#col`\n\t\t\tconst parts = value.split(/,|:|#/);\n\n\t\t\tconst maxLine = model.getLineCount();\n\t\t\tlet lineNumber = parseInt(parts[0]?.trim(), 10);\n\t\t\tif (parts.length < 1 || isNaN(lineNumber)) {\n\t\t\t\treturn {\n\t\t\t\t\tlabel: localize('gotoLine.linePrompt', \"Type a line number to go to (from 1 to {0}).\", maxLine)\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Handle negative line numbers and clip to valid range.\n\t\t\tlineNumber = lineNumber >= 0 ? lineNumber : (maxLine + 1) + lineNumber;\n\t\t\tlineNumber = Math.min(Math.max(1, lineNumber), maxLine);\n\n\t\t\tconst maxColumn = model.getLineMaxColumn(lineNumber);\n\t\t\tlet column = parseInt(parts[1]?.trim(), 10);\n\t\t\tif (parts.length < 2 || isNaN(column)) {\n\t\t\t\treturn {\n\t\t\t\t\tlineNumber,\n\t\t\t\t\tcolumn: 1,\n\t\t\t\t\tlabel: parts.length < 2 ?\n\t\t\t\t\t\tlocalize('gotoLine.lineColumnPrompt', \"Press 'Enter' to go to line {0} or enter colon : to add a column number.\", lineNumber) :\n\t\t\t\t\t\tlocalize('gotoLine.columnPrompt', \"Press 'Enter' to go to line {0} or enter a column number (from 1 to {1}).\", lineNumber, maxColumn)\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Handle negative column numbers and clip to valid range.\n\t\t\tcolumn = column >= 0 ? column : maxColumn + column;\n\t\t\tcolumn = Math.min(Math.max(1, column), maxColumn);\n\n\t\t\treturn {\n\t\t\t\tlineNumber,\n\t\t\t\tcolumn,\n\t\t\t\tlabel: localize('gotoLine.goToPosition', \"Press 'Enter' to go to line {0} at column {1}.\", lineNumber, column)\n\t\t\t};\n\t\t}\n\t}\n}\n"]}
@@ -39,7 +39,7 @@ let AbstractGotoSymbolQuickAccessProvider = class AbstractGotoSymbolQuickAccessP
39
39
  this.options.canAcceptInBackground = true;
40
40
  }
41
41
  provideWithoutTextEditor(picker) {
42
- this.provideLabelPick(picker, localize(1359, "To go to a symbol, first open a text editor with symbol information."));
42
+ this.provideLabelPick(picker, localize(1360, "To go to a symbol, first open a text editor with symbol information."));
43
43
  return Disposable.None;
44
44
  }
45
45
  provideWithTextEditor(context, picker, token, runOptions) {
@@ -60,7 +60,7 @@ let AbstractGotoSymbolQuickAccessProvider = class AbstractGotoSymbolQuickAccessP
60
60
  doProvideWithoutEditorSymbols(context, model, picker, token) {
61
61
  const disposables = new DisposableStore();
62
62
  // Generic pick for not having any symbol information
63
- this.provideLabelPick(picker, localize(1360, "The active text editor does not provide symbol information."));
63
+ this.provideLabelPick(picker, localize(1361, "The active text editor does not provide symbol information."));
64
64
  // Wait for changes to the registry and see if eventually
65
65
  // we do get symbols. This can happen if the picker is opened
66
66
  // very early after the model has loaded but before the
@@ -146,10 +146,10 @@ let AbstractGotoSymbolQuickAccessProvider = class AbstractGotoSymbolQuickAccessP
146
146
  }
147
147
  else {
148
148
  if (query.original.length > 0) {
149
- this.provideLabelPick(picker, localize(1361, "No matching editor symbols"));
149
+ this.provideLabelPick(picker, localize(1362, "No matching editor symbols"));
150
150
  }
151
151
  else {
152
- this.provideLabelPick(picker, localize(1362, "No editor symbols"));
152
+ this.provideLabelPick(picker, localize(1363, "No editor symbols"));
153
153
  }
154
154
  }
155
155
  }
@@ -196,7 +196,7 @@ let AbstractGotoSymbolQuickAccessProvider = class AbstractGotoSymbolQuickAccessP
196
196
  if (openSideBySideDirection) {
197
197
  buttons = [{
198
198
  iconClass: openSideBySideDirection === 'right' ? ThemeIcon.asClassName(Codicon.splitHorizontal) : ThemeIcon.asClassName(Codicon.splitVertical),
199
- tooltip: openSideBySideDirection === 'right' ? localize(1363, "Open to the Side") : localize(1364, "Open to the Bottom")
199
+ tooltip: openSideBySideDirection === 'right' ? localize(1364, "Open to the Side") : localize(1365, "Open to the Bottom")
200
200
  }];
201
201
  }
202
202
  const filteredSymbolPicks = [];
@@ -312,7 +312,7 @@ let AbstractGotoSymbolQuickAccessProvider = class AbstractGotoSymbolQuickAccessP
312
312
  }
313
313
  else if (sortedFilteredSymbolPicks.length > 0) {
314
314
  symbolPicks = [
315
- { label: localize(1365, "symbols ({0})", filteredSymbolPicks.length), type: 'separator' },
315
+ { label: localize(1366, "symbols ({0})", filteredSymbolPicks.length), type: 'separator' },
316
316
  ...sortedFilteredSymbolPicks
317
317
  ];
318
318
  }
@@ -362,33 +362,33 @@ AbstractGotoSymbolQuickAccessProvider = AbstractGotoSymbolQuickAccessProvider_1
362
362
  ], AbstractGotoSymbolQuickAccessProvider);
363
363
  export { AbstractGotoSymbolQuickAccessProvider };
364
364
  // #region NLS Helpers
365
- const FALLBACK_NLS_SYMBOL_KIND = localize(1366, "properties ({0})");
365
+ const FALLBACK_NLS_SYMBOL_KIND = localize(1367, "properties ({0})");
366
366
  const NLS_SYMBOL_KIND_CACHE = {
367
- [5 /* SymbolKind.Method */]: localize(1367, "methods ({0})"),
368
- [11 /* SymbolKind.Function */]: localize(1368, "functions ({0})"),
369
- [8 /* SymbolKind.Constructor */]: localize(1369, "constructors ({0})"),
370
- [12 /* SymbolKind.Variable */]: localize(1370, "variables ({0})"),
371
- [4 /* SymbolKind.Class */]: localize(1371, "classes ({0})"),
372
- [22 /* SymbolKind.Struct */]: localize(1372, "structs ({0})"),
373
- [23 /* SymbolKind.Event */]: localize(1373, "events ({0})"),
374
- [24 /* SymbolKind.Operator */]: localize(1374, "operators ({0})"),
375
- [10 /* SymbolKind.Interface */]: localize(1375, "interfaces ({0})"),
376
- [2 /* SymbolKind.Namespace */]: localize(1376, "namespaces ({0})"),
377
- [3 /* SymbolKind.Package */]: localize(1377, "packages ({0})"),
378
- [25 /* SymbolKind.TypeParameter */]: localize(1378, "type parameters ({0})"),
379
- [1 /* SymbolKind.Module */]: localize(1379, "modules ({0})"),
380
- [6 /* SymbolKind.Property */]: localize(1380, "properties ({0})"),
381
- [9 /* SymbolKind.Enum */]: localize(1381, "enumerations ({0})"),
382
- [21 /* SymbolKind.EnumMember */]: localize(1382, "enumeration members ({0})"),
383
- [14 /* SymbolKind.String */]: localize(1383, "strings ({0})"),
384
- [0 /* SymbolKind.File */]: localize(1384, "files ({0})"),
385
- [17 /* SymbolKind.Array */]: localize(1385, "arrays ({0})"),
386
- [15 /* SymbolKind.Number */]: localize(1386, "numbers ({0})"),
387
- [16 /* SymbolKind.Boolean */]: localize(1387, "booleans ({0})"),
388
- [18 /* SymbolKind.Object */]: localize(1388, "objects ({0})"),
389
- [19 /* SymbolKind.Key */]: localize(1389, "keys ({0})"),
390
- [7 /* SymbolKind.Field */]: localize(1390, "fields ({0})"),
391
- [13 /* SymbolKind.Constant */]: localize(1391, "constants ({0})")
367
+ [5 /* SymbolKind.Method */]: localize(1368, "methods ({0})"),
368
+ [11 /* SymbolKind.Function */]: localize(1369, "functions ({0})"),
369
+ [8 /* SymbolKind.Constructor */]: localize(1370, "constructors ({0})"),
370
+ [12 /* SymbolKind.Variable */]: localize(1371, "variables ({0})"),
371
+ [4 /* SymbolKind.Class */]: localize(1372, "classes ({0})"),
372
+ [22 /* SymbolKind.Struct */]: localize(1373, "structs ({0})"),
373
+ [23 /* SymbolKind.Event */]: localize(1374, "events ({0})"),
374
+ [24 /* SymbolKind.Operator */]: localize(1375, "operators ({0})"),
375
+ [10 /* SymbolKind.Interface */]: localize(1376, "interfaces ({0})"),
376
+ [2 /* SymbolKind.Namespace */]: localize(1377, "namespaces ({0})"),
377
+ [3 /* SymbolKind.Package */]: localize(1378, "packages ({0})"),
378
+ [25 /* SymbolKind.TypeParameter */]: localize(1379, "type parameters ({0})"),
379
+ [1 /* SymbolKind.Module */]: localize(1380, "modules ({0})"),
380
+ [6 /* SymbolKind.Property */]: localize(1381, "properties ({0})"),
381
+ [9 /* SymbolKind.Enum */]: localize(1382, "enumerations ({0})"),
382
+ [21 /* SymbolKind.EnumMember */]: localize(1383, "enumeration members ({0})"),
383
+ [14 /* SymbolKind.String */]: localize(1384, "strings ({0})"),
384
+ [0 /* SymbolKind.File */]: localize(1385, "files ({0})"),
385
+ [17 /* SymbolKind.Array */]: localize(1386, "arrays ({0})"),
386
+ [15 /* SymbolKind.Number */]: localize(1387, "numbers ({0})"),
387
+ [16 /* SymbolKind.Boolean */]: localize(1388, "booleans ({0})"),
388
+ [18 /* SymbolKind.Object */]: localize(1389, "objects ({0})"),
389
+ [19 /* SymbolKind.Key */]: localize(1390, "keys ({0})"),
390
+ [7 /* SymbolKind.Field */]: localize(1391, "fields ({0})"),
391
+ [13 /* SymbolKind.Constant */]: localize(1392, "constants ({0})")
392
392
  };
393
393
  //#endregion
394
394
  //# sourceMappingURL=gotoSymbolQuickAccess.js.map
@@ -20,10 +20,10 @@ export class ReadOnlyMessageController extends Disposable {
20
20
  let message = this.editor.getOptions().get(105 /* EditorOption.readOnlyMessage */);
21
21
  if (!message) {
22
22
  if (this.editor.isSimpleWidget) {
23
- message = new MarkdownString(nls.localize(1392, "Cannot edit in read-only input"));
23
+ message = new MarkdownString(nls.localize(1393, "Cannot edit in read-only input"));
24
24
  }
25
25
  else {
26
- message = new MarkdownString(nls.localize(1393, "Cannot edit in read-only editor"));
26
+ message = new MarkdownString(nls.localize(1394, "Cannot edit in read-only editor"));
27
27
  }
28
28
  }
29
29
  messageController.showMessage(message, this.editor.getPosition());
@@ -99,7 +99,7 @@ class RenameSkeleton {
99
99
  }
100
100
  const result = await provider.provideRenameEdits(this.model, this.position, newName, token);
101
101
  if (!result) {
102
- return this._provideRenameEdits(newName, i + 1, rejects.concat(nls.localize(1394, "No result.")), token);
102
+ return this._provideRenameEdits(newName, i + 1, rejects.concat(nls.localize(1395, "No result.")), token);
103
103
  }
104
104
  else if (result.rejectReason) {
105
105
  return this._provideRenameEdits(newName, i + 1, rejects.concat(result.rejectReason), token);
@@ -180,7 +180,7 @@ let RenameController = class RenameController {
180
180
  else {
181
181
  trace('resolve rename location failed', e instanceof Error ? e : JSON.stringify(e, null, '\t'));
182
182
  if (typeof e === 'string' || isMarkdownString(e)) {
183
- MessageController.get(this.editor)?.showMessage(e || nls.localize(1395, "An unknown error occurred while resolving rename location"), position);
183
+ MessageController.get(this.editor)?.showMessage(e || nls.localize(1396, "An unknown error occurred while resolving rename location"), position);
184
184
  }
185
185
  }
186
186
  return undefined;
@@ -248,24 +248,24 @@ let RenameController = class RenameController {
248
248
  this._bulkEditService.apply(renameResult, {
249
249
  editor: this.editor,
250
250
  showPreview: inputFieldResult.wantsPreview,
251
- label: nls.localize(1396, "Renaming '{0}' to '{1}'", loc?.text, inputFieldResult.newName),
251
+ label: nls.localize(1397, "Renaming '{0}' to '{1}'", loc?.text, inputFieldResult.newName),
252
252
  code: 'undoredo.rename',
253
- quotableLabel: nls.localize(1397, "Renaming {0} to {1}", loc?.text, inputFieldResult.newName),
253
+ quotableLabel: nls.localize(1398, "Renaming {0} to {1}", loc?.text, inputFieldResult.newName),
254
254
  respectAutoSaveConfig: true,
255
255
  reason: EditSources.rename(loc?.text, inputFieldResult.newName),
256
256
  }).then(result => {
257
257
  trace('edits applied');
258
258
  if (result.ariaSummary) {
259
- alert(nls.localize(1398, "Successfully renamed '{0}' to '{1}'. Summary: {2}", loc.text, inputFieldResult.newName, result.ariaSummary));
259
+ alert(nls.localize(1399, "Successfully renamed '{0}' to '{1}'. Summary: {2}", loc.text, inputFieldResult.newName, result.ariaSummary));
260
260
  }
261
261
  }).catch(err => {
262
262
  trace(`error when applying edits ${JSON.stringify(err, null, '\t')}`);
263
- this._notificationService.error(nls.localize(1399, "Rename failed to apply edits"));
263
+ this._notificationService.error(nls.localize(1400, "Rename failed to apply edits"));
264
264
  this._logService.error(err);
265
265
  });
266
266
  }, err => {
267
267
  trace('error when providing rename edits', JSON.stringify(err, null, '\t'));
268
- this._notificationService.error(nls.localize(1400, "Rename failed to compute edits"));
268
+ this._notificationService.error(nls.localize(1401, "Rename failed to compute edits"));
269
269
  this._logService.error(err);
270
270
  }).finally(() => {
271
271
  cts2.dispose();
@@ -301,7 +301,7 @@ export class RenameAction extends EditorAction {
301
301
  constructor() {
302
302
  super({
303
303
  id: 'editor.action.rename',
304
- label: nls.localize2(1402, "Rename Symbol"),
304
+ label: nls.localize2(1403, "Rename Symbol"),
305
305
  precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasRenameProvider),
306
306
  kbOpts: {
307
307
  kbExpr: EditorContextKeys.editorTextFocus,
@@ -382,7 +382,7 @@ registerAction2(class FocusNextRenameSuggestion extends Action2 {
382
382
  super({
383
383
  id: 'focusNextRenameSuggestion',
384
384
  title: {
385
- ...nls.localize2(1403, "Focus Next Rename Suggestion"),
385
+ ...nls.localize2(1404, "Focus Next Rename Suggestion"),
386
386
  },
387
387
  precondition: CONTEXT_RENAME_INPUT_VISIBLE,
388
388
  keybinding: [
@@ -410,7 +410,7 @@ registerAction2(class FocusPreviousRenameSuggestion extends Action2 {
410
410
  super({
411
411
  id: 'focusPreviousRenameSuggestion',
412
412
  title: {
413
- ...nls.localize2(1404, "Focus Previous Rename Suggestion"),
413
+ ...nls.localize2(1405, "Focus Previous Rename Suggestion"),
414
414
  },
415
415
  precondition: CONTEXT_RENAME_INPUT_VISIBLE,
416
416
  keybinding: [
@@ -455,7 +455,7 @@ Registry.as(Extensions.Configuration).registerConfiguration({
455
455
  properties: {
456
456
  'editor.rename.enablePreview': {
457
457
  scope: 6 /* ConfigurationScope.LANGUAGE_OVERRIDABLE */,
458
- description: nls.localize(1401, "Enable/disable the ability to preview changes before renaming"),
458
+ description: nls.localize(1402, "Enable/disable the ability to preview changes before renaming"),
459
459
  default: true,
460
460
  type: 'boolean'
461
461
  }
@@ -39,8 +39,8 @@ import { editorWidgetBackground, inputBackground, inputBorder, inputForeground,
39
39
  import { IThemeService } from '../../../../platform/theme/common/themeService.js';
40
40
  /** for debugging */
41
41
  const _sticky = false;
42
- export const CONTEXT_RENAME_INPUT_VISIBLE = new RawContextKey('renameInputVisible', false, nls.localize(1405, "Whether the rename input widget is visible"));
43
- export const CONTEXT_RENAME_INPUT_FOCUSED = new RawContextKey('renameInputFocused', false, nls.localize(1406, "Whether the rename input widget is focused"));
42
+ export const CONTEXT_RENAME_INPUT_VISIBLE = new RawContextKey('renameInputVisible', false, nls.localize(1406, "Whether the rename input widget is visible"));
43
+ export const CONTEXT_RENAME_INPUT_FOCUSED = new RawContextKey('renameInputFocused', false, nls.localize(1407, "Whether the rename input widget is focused"));
44
44
  let RenameWidget = class RenameWidget {
45
45
  constructor(_editor, _acceptKeybindings, _themeService, _keybindingService, contextKeyService, _logService) {
46
46
  this._editor = _editor;
@@ -163,7 +163,7 @@ let RenameWidget = class RenameWidget {
163
163
  }
164
164
  beforeRender() {
165
165
  const [accept, preview] = this._acceptKeybindings;
166
- this._label.innerText = nls.localize(1407, "{0} to Rename, {1} to Preview", this._keybindingService.lookupKeybinding(accept)?.getLabel(), this._keybindingService.lookupKeybinding(preview)?.getLabel());
166
+ this._label.innerText = nls.localize(1408, "{0} to Rename, {1} to Preview", this._keybindingService.lookupKeybinding(accept)?.getLabel(), this._keybindingService.lookupKeybinding(preview)?.getLabel());
167
167
  this._domNode.style.minWidth = `200px`; // to prevent from widening when candidates come in
168
168
  return null;
169
169
  }
@@ -477,7 +477,7 @@ class RenameCandidateListView {
477
477
  // adjust list container layout
478
478
  this._listContainer.style.height = `${height}px`;
479
479
  this._listContainer.style.width = `${width}px`;
480
- aria.status(nls.localize(1408, "Received {0} rename suggestions", candidates.length));
480
+ aria.status(nls.localize(1409, "Received {0} rename suggestions", candidates.length));
481
481
  }
482
482
  clearCandidates() {
483
483
  this._listContainer.style.height = '0px';
@@ -619,13 +619,13 @@ class InputWithButton {
619
619
  this._inputNode.className = 'rename-input';
620
620
  this._inputNode.type = 'text';
621
621
  this._inputNode.style.border = 'none';
622
- this._inputNode.setAttribute('aria-label', nls.localize(1409, "Rename input. Type new name and press Enter to commit."));
622
+ this._inputNode.setAttribute('aria-label', nls.localize(1410, "Rename input. Type new name and press Enter to commit."));
623
623
  this._domNode.appendChild(this._inputNode);
624
624
  this._buttonNode = document.createElement('div');
625
625
  this._buttonNode.className = 'rename-suggestions-button';
626
626
  this._buttonNode.setAttribute('tabindex', '0');
627
- this._buttonGenHoverText = nls.localize(1410, "Generate New Name Suggestions");
628
- this._buttonCancelHoverText = nls.localize(1411, "Cancel");
627
+ this._buttonGenHoverText = nls.localize(1411, "Generate New Name Suggestions");
628
+ this._buttonCancelHoverText = nls.localize(1412, "Cancel");
629
629
  this._buttonHoverContent = this._buttonGenHoverText;
630
630
  this._disposables.add(getBaseLayerHoverDelegate().setupDelayedHover(this._buttonNode, () => ({
631
631
  content: this._buttonHoverContent,
@@ -131,7 +131,7 @@ class GrowSelectionAction extends AbstractSmartSelect {
131
131
  constructor() {
132
132
  super(true, {
133
133
  id: 'editor.action.smartSelect.expand',
134
- label: nls.localize2(1414, "Expand Selection"),
134
+ label: nls.localize2(1415, "Expand Selection"),
135
135
  precondition: undefined,
136
136
  kbOpts: {
137
137
  kbExpr: EditorContextKeys.editorTextFocus,
@@ -145,7 +145,7 @@ class GrowSelectionAction extends AbstractSmartSelect {
145
145
  menuOpts: {
146
146
  menuId: MenuId.MenubarSelectionMenu,
147
147
  group: '1_basic',
148
- title: nls.localize(1412, "&&Expand Selection"),
148
+ title: nls.localize(1413, "&&Expand Selection"),
149
149
  order: 2
150
150
  }
151
151
  });
@@ -157,7 +157,7 @@ class ShrinkSelectionAction extends AbstractSmartSelect {
157
157
  constructor() {
158
158
  super(false, {
159
159
  id: 'editor.action.smartSelect.shrink',
160
- label: nls.localize2(1415, "Shrink Selection"),
160
+ label: nls.localize2(1416, "Shrink Selection"),
161
161
  precondition: undefined,
162
162
  kbOpts: {
163
163
  kbExpr: EditorContextKeys.editorTextFocus,
@@ -171,7 +171,7 @@ class ShrinkSelectionAction extends AbstractSmartSelect {
171
171
  menuOpts: {
172
172
  menuId: MenuId.MenubarSelectionMenu,
173
173
  group: '1_basic',
174
- title: nls.localize(1413, "&&Shrink Selection"),
174
+ title: nls.localize(1414, "&&Shrink Selection"),
175
175
  order: 3
176
176
  }
177
177
  });
@@ -40,9 +40,9 @@ let SnippetController2 = class SnippetController2 {
40
40
  static get(editor) {
41
41
  return editor.getContribution(SnippetController2_1.ID);
42
42
  }
43
- static { this.InSnippetMode = new RawContextKey('inSnippetMode', false, localize(1416, "Whether the editor in current in snippet mode")); }
44
- static { this.HasNextTabstop = new RawContextKey('hasNextTabstop', false, localize(1417, "Whether there is a next tab stop when in snippet mode")); }
45
- static { this.HasPrevTabstop = new RawContextKey('hasPrevTabstop', false, localize(1418, "Whether there is a previous tab stop when in snippet mode")); }
43
+ static { this.InSnippetMode = new RawContextKey('inSnippetMode', false, localize(1417, "Whether the editor in current in snippet mode")); }
44
+ static { this.HasNextTabstop = new RawContextKey('hasNextTabstop', false, localize(1418, "Whether there is a next tab stop when in snippet mode")); }
45
+ static { this.HasPrevTabstop = new RawContextKey('hasPrevTabstop', false, localize(1419, "Whether there is a previous tab stop when in snippet mode")); }
46
46
  constructor(_editor, _logService, _languageFeaturesService, contextKeyService, _languageConfigurationService) {
47
47
  this._editor = _editor;
48
48
  this._logService = _logService;
@@ -128,7 +128,7 @@ let SnippetController2 = class SnippetController2 {
128
128
  sortText: 'a'.repeat(i + 1),
129
129
  range: activeChoice.range,
130
130
  filterText: isAnyOfOptions ? `${word}_${option.value}` : undefined,
131
- command: { id: 'jumpToNextSnippetPlaceholder', title: localize(1419, 'Go to next placeholder...') }
131
+ command: { id: 'jumpToNextSnippetPlaceholder', title: localize(1420, 'Go to next placeholder...') }
132
132
  });
133
133
  }
134
134
  return { suggestions };
@@ -245,10 +245,10 @@ export class TimeBasedVariableResolver {
245
245
  constructor() {
246
246
  this._date = new Date();
247
247
  }
248
- static { this.dayNames = [nls.localize(1420, "Sunday"), nls.localize(1421, "Monday"), nls.localize(1422, "Tuesday"), nls.localize(1423, "Wednesday"), nls.localize(1424, "Thursday"), nls.localize(1425, "Friday"), nls.localize(1426, "Saturday")]; }
249
- static { this.dayNamesShort = [nls.localize(1427, "Sun"), nls.localize(1428, "Mon"), nls.localize(1429, "Tue"), nls.localize(1430, "Wed"), nls.localize(1431, "Thu"), nls.localize(1432, "Fri"), nls.localize(1433, "Sat")]; }
250
- static { this.monthNames = [nls.localize(1434, "January"), nls.localize(1435, "February"), nls.localize(1436, "March"), nls.localize(1437, "April"), nls.localize(1438, "May"), nls.localize(1439, "June"), nls.localize(1440, "July"), nls.localize(1441, "August"), nls.localize(1442, "September"), nls.localize(1443, "October"), nls.localize(1444, "November"), nls.localize(1445, "December")]; }
251
- static { this.monthNamesShort = [nls.localize(1446, "Jan"), nls.localize(1447, "Feb"), nls.localize(1448, "Mar"), nls.localize(1449, "Apr"), nls.localize(1450, "May"), nls.localize(1451, "Jun"), nls.localize(1452, "Jul"), nls.localize(1453, "Aug"), nls.localize(1454, "Sep"), nls.localize(1455, "Oct"), nls.localize(1456, "Nov"), nls.localize(1457, "Dec")]; }
248
+ static { this.dayNames = [nls.localize(1421, "Sunday"), nls.localize(1422, "Monday"), nls.localize(1423, "Tuesday"), nls.localize(1424, "Wednesday"), nls.localize(1425, "Thursday"), nls.localize(1426, "Friday"), nls.localize(1427, "Saturday")]; }
249
+ static { this.dayNamesShort = [nls.localize(1428, "Sun"), nls.localize(1429, "Mon"), nls.localize(1430, "Tue"), nls.localize(1431, "Wed"), nls.localize(1432, "Thu"), nls.localize(1433, "Fri"), nls.localize(1434, "Sat")]; }
250
+ static { this.monthNames = [nls.localize(1435, "January"), nls.localize(1436, "February"), nls.localize(1437, "March"), nls.localize(1438, "April"), nls.localize(1439, "May"), nls.localize(1440, "June"), nls.localize(1441, "July"), nls.localize(1442, "August"), nls.localize(1443, "September"), nls.localize(1444, "October"), nls.localize(1445, "November"), nls.localize(1446, "December")]; }
251
+ static { this.monthNamesShort = [nls.localize(1447, "Jan"), nls.localize(1448, "Feb"), nls.localize(1449, "Mar"), nls.localize(1450, "Apr"), nls.localize(1451, "May"), nls.localize(1452, "Jun"), nls.localize(1453, "Jul"), nls.localize(1454, "Aug"), nls.localize(1455, "Sep"), nls.localize(1456, "Oct"), nls.localize(1457, "Nov"), nls.localize(1458, "Dec")]; }
252
252
  resolve(variable) {
253
253
  const { name } = variable;
254
254
  if (name === 'CURRENT_YEAR') {
@@ -15,17 +15,17 @@ export class ToggleStickyScroll extends EditorAction2 {
15
15
  super({
16
16
  id: 'editor.action.toggleStickyScroll',
17
17
  title: {
18
- ...localize2(1462, "Toggle Editor Sticky Scroll"),
19
- mnemonicTitle: localize(1458, "&&Toggle Editor Sticky Scroll"),
18
+ ...localize2(1463, "Toggle Editor Sticky Scroll"),
19
+ mnemonicTitle: localize(1459, "&&Toggle Editor Sticky Scroll"),
20
20
  },
21
21
  metadata: {
22
- description: localize2(1463, "Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport"),
22
+ description: localize2(1464, "Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport"),
23
23
  },
24
24
  category: Categories.View,
25
25
  toggled: {
26
26
  condition: ContextKeyExpr.equals('config.editor.stickyScroll.enabled', true),
27
- title: localize(1459, "Sticky Scroll"),
28
- mnemonicTitle: localize(1460, "&&Sticky Scroll"),
27
+ title: localize(1460, "Sticky Scroll"),
28
+ mnemonicTitle: localize(1461, "&&Sticky Scroll"),
29
29
  },
30
30
  menu: [
31
31
  { id: MenuId.CommandPalette },
@@ -50,8 +50,8 @@ export class FocusStickyScroll extends EditorAction2 {
50
50
  super({
51
51
  id: 'editor.action.focusStickyScroll',
52
52
  title: {
53
- ...localize2(1464, "Focus Editor Sticky Scroll"),
54
- mnemonicTitle: localize(1461, "&&Focus Editor Sticky Scroll"),
53
+ ...localize2(1465, "Focus Editor Sticky Scroll"),
54
+ mnemonicTitle: localize(1462, "&&Focus Editor Sticky Scroll"),
55
55
  },
56
56
  precondition: ContextKeyExpr.and(ContextKeyExpr.has('config.editor.stickyScroll.enabled'), EditorContextKeys.stickyScrollVisible),
57
57
  menu: [
@@ -67,7 +67,7 @@ export class SelectNextStickyScrollLine extends EditorAction2 {
67
67
  constructor() {
68
68
  super({
69
69
  id: 'editor.action.selectNextStickyScrollLine',
70
- title: localize2(1465, "Select the next editor sticky scroll line"),
70
+ title: localize2(1466, "Select the next editor sticky scroll line"),
71
71
  precondition: EditorContextKeys.stickyScrollFocused.isEqualTo(true),
72
72
  keybinding: {
73
73
  weight,
@@ -83,7 +83,7 @@ export class SelectPreviousStickyScrollLine extends EditorAction2 {
83
83
  constructor() {
84
84
  super({
85
85
  id: 'editor.action.selectPreviousStickyScrollLine',
86
- title: localize2(1466, "Select the previous sticky scroll line"),
86
+ title: localize2(1467, "Select the previous sticky scroll line"),
87
87
  precondition: EditorContextKeys.stickyScrollFocused.isEqualTo(true),
88
88
  keybinding: {
89
89
  weight,
@@ -99,7 +99,7 @@ export class GoToStickyScrollLine extends EditorAction2 {
99
99
  constructor() {
100
100
  super({
101
101
  id: 'editor.action.goToFocusedStickyScrollLine',
102
- title: localize2(1467, "Go to the focused sticky scroll line"),
102
+ title: localize2(1468, "Go to the focused sticky scroll line"),
103
103
  precondition: EditorContextKeys.stickyScrollFocused.isEqualTo(true),
104
104
  keybinding: {
105
105
  weight,
@@ -115,7 +115,7 @@ export class SelectEditor extends EditorAction2 {
115
115
  constructor() {
116
116
  super({
117
117
  id: 'editor.action.selectEditor',
118
- title: localize2(1468, "Select Editor"),
118
+ title: localize2(1469, "Select Editor"),
119
119
  precondition: EditorContextKeys.stickyScrollFocused.isEqualTo(true),
120
120
  keybinding: {
121
121
  weight,