monaco-editor-core 0.58.0 → 0.59.0-dev-20261124

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 (211) 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 +2 -0
  18. package/esm/vs/base/browser/ui/selectBox/selectBox.js.map +1 -1
  19. package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js +3 -0
  20. package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js.map +1 -1
  21. package/esm/vs/base/browser/ui/selectBox/selectBoxNative.js +4 -2
  22. package/esm/vs/base/browser/ui/selectBox/selectBoxNative.js.map +1 -1
  23. package/esm/vs/base/browser/ui/tree/abstractTree.js +27 -1
  24. package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
  25. package/esm/vs/base/common/cancellation.js +3 -1
  26. package/esm/vs/base/common/cancellation.js.map +1 -1
  27. package/esm/vs/editor/browser/controller/mouseHandler.js +8 -1
  28. package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
  29. package/esm/vs/editor/browser/controller/mouseTarget.js +15 -6
  30. package/esm/vs/editor/browser/controller/mouseTarget.js.map +1 -1
  31. package/esm/vs/editor/browser/view.js +3 -2
  32. package/esm/vs/editor/browser/view.js.map +1 -1
  33. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +12 -8
  34. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
  35. package/esm/vs/editor/browser/viewParts/viewLines/viewLine.js +7 -11
  36. package/esm/vs/editor/browser/viewParts/viewLines/viewLine.js.map +1 -1
  37. package/esm/vs/editor/common/config/editorOptions.js +246 -238
  38. package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
  39. package/esm/vs/editor/common/core/editorColorRegistry.js +71 -71
  40. package/esm/vs/editor/common/editorContextKeys.js +53 -53
  41. package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
  42. package/esm/vs/editor/common/languages.js +56 -56
  43. package/esm/vs/editor/common/model/editStack.js +1 -1
  44. package/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js +3 -1
  45. package/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js.map +1 -1
  46. package/esm/vs/editor/common/model/textModel.js +1 -0
  47. package/esm/vs/editor/common/model/textModel.js.map +1 -1
  48. package/esm/vs/editor/common/model.js.map +1 -1
  49. package/esm/vs/editor/common/standaloneStrings.js +11 -11
  50. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
  51. package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
  52. package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
  53. package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
  54. package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
  55. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +17 -17
  56. package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
  57. package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
  58. package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
  59. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
  60. package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
  61. package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
  62. package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
  63. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
  64. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
  65. package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +1 -1
  66. package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
  67. package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
  68. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +13 -13
  69. package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
  70. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
  71. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +9 -9
  72. package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
  73. package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
  74. package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
  75. package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js.map +1 -1
  76. package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
  77. package/esm/vs/editor/contrib/find/browser/findController.js +17 -17
  78. package/esm/vs/editor/contrib/find/browser/findWidget.js +29 -29
  79. package/esm/vs/editor/contrib/folding/browser/folding.css +15 -0
  80. package/esm/vs/editor/contrib/folding/browser/folding.js +20 -20
  81. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
  82. package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
  83. package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
  84. package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
  85. package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
  86. package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
  87. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
  88. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
  89. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
  90. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
  91. package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
  92. package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
  93. package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
  94. package/esm/vs/editor/contrib/hover/browser/contentHoverRendered.js +1 -1
  95. package/esm/vs/editor/contrib/hover/browser/contentHoverRendered.js.map +1 -1
  96. package/esm/vs/editor/contrib/hover/browser/contentHoverWidget.js +0 -5
  97. package/esm/vs/editor/contrib/hover/browser/contentHoverWidget.js.map +1 -1
  98. package/esm/vs/editor/contrib/hover/browser/contentHoverWidgetWrapper.js +0 -3
  99. package/esm/vs/editor/contrib/hover/browser/contentHoverWidgetWrapper.js.map +1 -1
  100. package/esm/vs/editor/contrib/hover/browser/hover.css +6 -2
  101. package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
  102. package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
  103. package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js +2 -2
  104. package/esm/vs/editor/contrib/hover/browser/hoverTypes.js.map +1 -1
  105. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +19 -39
  106. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
  107. package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +7 -7
  108. package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
  109. package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
  110. package/esm/vs/editor/contrib/indentation/common/indentation.js +14 -3
  111. package/esm/vs/editor/contrib/indentation/common/indentation.js.map +1 -1
  112. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
  113. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +21 -21
  114. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +13 -13
  115. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +6 -6
  116. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
  117. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +4 -4
  118. package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +2 -2
  119. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +6 -6
  120. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +1 -1
  121. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +3 -3
  122. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
  123. package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
  124. package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  125. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +31 -31
  126. package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
  127. package/esm/vs/editor/contrib/links/browser/links.js +11 -10
  128. package/esm/vs/editor/contrib/links/browser/links.js.map +1 -1
  129. package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
  130. package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
  131. package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
  132. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
  133. package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
  134. package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
  135. package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +1 -1
  136. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +12 -12
  137. package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
  138. package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
  139. package/esm/vs/editor/contrib/rename/browser/rename.js +11 -11
  140. package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
  141. package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
  142. package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +5 -5
  143. package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  144. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  145. package/esm/vs/editor/contrib/suggest/browser/suggest.js +9 -9
  146. package/esm/vs/editor/contrib/suggest/browser/suggestController.js +11 -11
  147. package/esm/vs/editor/contrib/suggest/browser/suggestModel.js +93 -38
  148. package/esm/vs/editor/contrib/suggest/browser/suggestModel.js.map +1 -1
  149. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +18 -18
  150. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +3 -3
  151. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
  152. package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
  153. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  154. package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  155. package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  156. package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
  157. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
  158. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
  159. package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  160. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
  161. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +3 -3
  162. package/esm/vs/editor/editor.api.d.ts +5 -0
  163. package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +68 -68
  164. package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
  165. package/esm/vs/platform/actionWidget/browser/actionList.js +30 -31
  166. package/esm/vs/platform/actionWidget/browser/actionList.js.map +1 -1
  167. package/esm/vs/platform/actionWidget/browser/actionWidget.css +1 -1
  168. package/esm/vs/platform/actionWidget/browser/actionWidget.js +12 -12
  169. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +3 -3
  170. package/esm/vs/platform/actions/browser/toolbar.js +2 -2
  171. package/esm/vs/platform/actions/common/menuService.js +2 -2
  172. package/esm/vs/platform/configuration/common/configurationModels.js +15 -3
  173. package/esm/vs/platform/configuration/common/configurationModels.js.map +1 -1
  174. package/esm/vs/platform/configuration/common/configurationRegistry.js +12 -12
  175. package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
  176. package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
  177. package/esm/vs/platform/contextkey/common/contextkeys.js +10 -10
  178. package/esm/vs/platform/contextkey/common/scanner.js +5 -5
  179. package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  180. package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
  181. package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
  182. package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +5 -5
  183. package/esm/vs/platform/list/browser/listService.js +27 -27
  184. package/esm/vs/platform/markers/common/markerService.js +2 -2
  185. package/esm/vs/platform/markers/common/markers.js +6 -6
  186. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +8 -8
  187. package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
  188. package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
  189. package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
  190. package/esm/vs/platform/quickinput/browser/quickInputController.js +6 -6
  191. package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
  192. package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  193. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  194. package/esm/vs/platform/quickinput/browser/tree/quickTree.js +1 -1
  195. package/esm/vs/platform/theme/common/colorUtils.js +2 -2
  196. package/esm/vs/platform/theme/common/colors/baseColors.js +19 -19
  197. package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
  198. package/esm/vs/platform/theme/common/colors/confettiColors.js +6 -6
  199. package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
  200. package/esm/vs/platform/theme/common/colors/inputColors.js +48 -48
  201. package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
  202. package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
  203. package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
  204. package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
  205. package/esm/vs/platform/theme/common/colors/quickpickColors.js +10 -10
  206. package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
  207. package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
  208. package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
  209. package/esm/vs/platform/workspace/common/workspace.js +1 -1
  210. package/monaco.d.ts +5 -0
  211. package/package.json +3 -3
@@ -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(1469, "Whether the rename input widget is visible"));
43
- export const CONTEXT_RENAME_INPUT_FOCUSED = new RawContextKey('renameInputFocused', false, nls.localize(1470, "Whether the rename input widget is focused"));
42
+ export const CONTEXT_RENAME_INPUT_VISIBLE = new RawContextKey('renameInputVisible', false, nls.localize(1470, "Whether the rename input widget is visible"));
43
+ export const CONTEXT_RENAME_INPUT_FOCUSED = new RawContextKey('renameInputFocused', false, nls.localize(1471, "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(1471, "{0} to Rename, {1} to Preview", this._keybindingService.lookupKeybinding(accept)?.getLabel(), this._keybindingService.lookupKeybinding(preview)?.getLabel());
166
+ this._label.innerText = nls.localize(1472, "{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(1472, "Received {0} rename suggestions", candidates.length));
480
+ aria.status(nls.localize(1473, "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(1473, "Rename input. Type new name and press Enter to commit."));
622
+ this._inputNode.setAttribute('aria-label', nls.localize(1474, "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(1474, "Generate New Name Suggestions");
628
- this._buttonCancelHoverText = nls.localize(1475, "Cancel");
627
+ this._buttonGenHoverText = nls.localize(1475, "Generate New Name Suggestions");
628
+ this._buttonCancelHoverText = nls.localize(1476, "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(1478, "Expand Selection"),
134
+ label: nls.localize2(1479, "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(1476, "&&Expand Selection"),
148
+ title: nls.localize(1477, "&&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(1479, "Shrink Selection"),
160
+ label: nls.localize2(1480, "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(1477, "&&Shrink Selection"),
174
+ title: nls.localize(1478, "&&Shrink Selection"),
175
175
  order: 3
176
176
  }
177
177
  });
@@ -41,10 +41,10 @@ let SnippetController2 = class SnippetController2 {
41
41
  static get(editor) {
42
42
  return editor.getContribution(SnippetController2_1.ID);
43
43
  }
44
- static { this.InSnippetMode = new RawContextKey('inSnippetMode', false, localize(1480, "Whether the editor in current in snippet mode")); }
45
- static { this.HasNextTabstop = new RawContextKey('hasNextTabstop', false, localize(1481, "Whether there is a next tab stop when in snippet mode")); }
46
- static { this.HasPrevTabstop = new RawContextKey('hasPrevTabstop', false, localize(1482, "Whether there is a previous tab stop when in snippet mode")); }
47
- static { this.InSnippetChoice = new RawContextKey('inSnippetChoice', false, localize(1483, "Whether the current snippet tab stop is a choice")); }
44
+ static { this.InSnippetMode = new RawContextKey('inSnippetMode', false, localize(1481, "Whether the editor in current in snippet mode")); }
45
+ static { this.HasNextTabstop = new RawContextKey('hasNextTabstop', false, localize(1482, "Whether there is a next tab stop when in snippet mode")); }
46
+ static { this.HasPrevTabstop = new RawContextKey('hasPrevTabstop', false, localize(1483, "Whether there is a previous tab stop when in snippet mode")); }
47
+ static { this.InSnippetChoice = new RawContextKey('inSnippetChoice', false, localize(1484, "Whether the current snippet tab stop is a choice")); }
48
48
  constructor(_editor, _logService, _languageFeaturesService, contextKeyService, _languageConfigurationService) {
49
49
  this._editor = _editor;
50
50
  this._logService = _logService;
@@ -132,7 +132,7 @@ let SnippetController2 = class SnippetController2 {
132
132
  sortText: 'a'.repeat(i + 1),
133
133
  range: activeChoice.range,
134
134
  filterText: isAnyOfOptions ? `${word}_${option.value}` : undefined,
135
- command: { id: 'jumpToNextSnippetPlaceholder', title: localize(1484, 'Go to next placeholder...') }
135
+ command: { id: 'jumpToNextSnippetPlaceholder', title: localize(1485, 'Go to next placeholder...') }
136
136
  });
137
137
  }
138
138
  return { suggestions };
@@ -248,10 +248,10 @@ export class TimeBasedVariableResolver {
248
248
  constructor() {
249
249
  this._date = new Date();
250
250
  }
251
- static { this.dayNames = [nls.localize(1485, "Sunday"), nls.localize(1486, "Monday"), nls.localize(1487, "Tuesday"), nls.localize(1488, "Wednesday"), nls.localize(1489, "Thursday"), nls.localize(1490, "Friday"), nls.localize(1491, "Saturday")]; }
252
- static { this.dayNamesShort = [nls.localize(1492, "Sun"), nls.localize(1493, "Mon"), nls.localize(1494, "Tue"), nls.localize(1495, "Wed"), nls.localize(1496, "Thu"), nls.localize(1497, "Fri"), nls.localize(1498, "Sat")]; }
253
- static { this.monthNames = [nls.localize(1499, "January"), nls.localize(1500, "February"), nls.localize(1501, "March"), nls.localize(1502, "April"), nls.localize(1503, "May"), nls.localize(1504, "June"), nls.localize(1505, "July"), nls.localize(1506, "August"), nls.localize(1507, "September"), nls.localize(1508, "October"), nls.localize(1509, "November"), nls.localize(1510, "December")]; }
254
- static { this.monthNamesShort = [nls.localize(1511, "Jan"), nls.localize(1512, "Feb"), nls.localize(1513, "Mar"), nls.localize(1514, "Apr"), nls.localize(1515, "May"), nls.localize(1516, "Jun"), nls.localize(1517, "Jul"), nls.localize(1518, "Aug"), nls.localize(1519, "Sep"), nls.localize(1520, "Oct"), nls.localize(1521, "Nov"), nls.localize(1522, "Dec")]; }
251
+ static { this.dayNames = [nls.localize(1486, "Sunday"), nls.localize(1487, "Monday"), nls.localize(1488, "Tuesday"), nls.localize(1489, "Wednesday"), nls.localize(1490, "Thursday"), nls.localize(1491, "Friday"), nls.localize(1492, "Saturday")]; }
252
+ static { this.dayNamesShort = [nls.localize(1493, "Sun"), nls.localize(1494, "Mon"), nls.localize(1495, "Tue"), nls.localize(1496, "Wed"), nls.localize(1497, "Thu"), nls.localize(1498, "Fri"), nls.localize(1499, "Sat")]; }
253
+ static { this.monthNames = [nls.localize(1500, "January"), nls.localize(1501, "February"), nls.localize(1502, "March"), nls.localize(1503, "April"), nls.localize(1504, "May"), nls.localize(1505, "June"), nls.localize(1506, "July"), nls.localize(1507, "August"), nls.localize(1508, "September"), nls.localize(1509, "October"), nls.localize(1510, "November"), nls.localize(1511, "December")]; }
254
+ static { this.monthNamesShort = [nls.localize(1512, "Jan"), nls.localize(1513, "Feb"), nls.localize(1514, "Mar"), nls.localize(1515, "Apr"), nls.localize(1516, "May"), nls.localize(1517, "Jun"), nls.localize(1518, "Jul"), nls.localize(1519, "Aug"), nls.localize(1520, "Sep"), nls.localize(1521, "Oct"), nls.localize(1522, "Nov"), nls.localize(1523, "Dec")]; }
255
255
  resolve(variable) {
256
256
  const { name } = variable;
257
257
  switch (name) {
@@ -15,17 +15,17 @@ export class ToggleStickyScroll extends EditorAction2 {
15
15
  super({
16
16
  id: 'editor.action.toggleStickyScroll',
17
17
  title: {
18
- ...localize2(1527, "Toggle Editor Sticky Scroll"),
19
- mnemonicTitle: localize(1523, "&&Toggle Editor Sticky Scroll"),
18
+ ...localize2(1528, "Toggle Editor Sticky Scroll"),
19
+ mnemonicTitle: localize(1524, "&&Toggle Editor Sticky Scroll"),
20
20
  },
21
21
  metadata: {
22
- description: localize2(1528, "Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport"),
22
+ description: localize2(1529, "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(1524, "Sticky Scroll"),
28
- mnemonicTitle: localize(1525, "&&Sticky Scroll"),
27
+ title: localize(1525, "Sticky Scroll"),
28
+ mnemonicTitle: localize(1526, "&&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(1529, "Focus Editor Sticky Scroll"),
54
- mnemonicTitle: localize(1526, "&&Focus Editor Sticky Scroll"),
53
+ ...localize2(1530, "Focus Editor Sticky Scroll"),
54
+ mnemonicTitle: localize(1527, "&&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(1530, "Select the next editor sticky scroll line"),
70
+ title: localize2(1531, "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(1531, "Select the previous sticky scroll line"),
86
+ title: localize2(1532, "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(1532, "Go to the focused sticky scroll line"),
102
+ title: localize2(1533, "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(1533, "Select Editor"),
118
+ title: localize2(1534, "Select Editor"),
119
119
  precondition: EditorContextKeys.stickyScrollFocused.isEqualTo(true),
120
120
  keybinding: {
121
121
  weight,
@@ -21,15 +21,15 @@ import { ILanguageFeaturesService } from '../../../common/services/languageFeatu
21
21
  import { historyNavigationVisible } from '../../../../platform/history/browser/contextScopedHistoryWidget.js';
22
22
  export const Context = {
23
23
  Visible: historyNavigationVisible,
24
- HasFocusedSuggestion: new RawContextKey('suggestWidgetHasFocusedSuggestion', false, localize(1534, "Whether any suggestion is focused")),
25
- DetailsVisible: new RawContextKey('suggestWidgetDetailsVisible', false, localize(1535, "Whether suggestion details are visible")),
26
- DetailsFocused: new RawContextKey('suggestWidgetDetailsFocused', false, localize(1536, "Whether the details pane of the suggest widget has focus")),
27
- MultipleSuggestions: new RawContextKey('suggestWidgetMultipleSuggestions', false, localize(1537, "Whether there are multiple suggestions to pick from")),
28
- MakesTextEdit: new RawContextKey('suggestionMakesTextEdit', true, localize(1538, "Whether inserting the current suggestion yields in a change or has everything already been typed")),
29
- AcceptSuggestionsOnEnter: new RawContextKey('acceptSuggestionOnEnter', true, localize(1539, "Whether suggestions are inserted when pressing Enter")),
30
- HasInsertAndReplaceRange: new RawContextKey('suggestionHasInsertAndReplaceRange', false, localize(1540, "Whether the current suggestion has insert and replace behaviour")),
31
- InsertMode: new RawContextKey('suggestionInsertMode', undefined, { type: 'string', description: localize(1541, "Whether the default behaviour is to insert or replace") }),
32
- CanResolve: new RawContextKey('suggestionCanResolve', false, localize(1542, "Whether the current suggestion supports to resolve further details")),
24
+ HasFocusedSuggestion: new RawContextKey('suggestWidgetHasFocusedSuggestion', false, localize(1535, "Whether any suggestion is focused")),
25
+ DetailsVisible: new RawContextKey('suggestWidgetDetailsVisible', false, localize(1536, "Whether suggestion details are visible")),
26
+ DetailsFocused: new RawContextKey('suggestWidgetDetailsFocused', false, localize(1537, "Whether the details pane of the suggest widget has focus")),
27
+ MultipleSuggestions: new RawContextKey('suggestWidgetMultipleSuggestions', false, localize(1538, "Whether there are multiple suggestions to pick from")),
28
+ MakesTextEdit: new RawContextKey('suggestionMakesTextEdit', true, localize(1539, "Whether inserting the current suggestion yields in a change or has everything already been typed")),
29
+ AcceptSuggestionsOnEnter: new RawContextKey('acceptSuggestionOnEnter', true, localize(1540, "Whether suggestions are inserted when pressing Enter")),
30
+ HasInsertAndReplaceRange: new RawContextKey('suggestionHasInsertAndReplaceRange', false, localize(1541, "Whether the current suggestion has insert and replace behaviour")),
31
+ InsertMode: new RawContextKey('suggestionInsertMode', undefined, { type: 'string', description: localize(1542, "Whether the default behaviour is to insert or replace") }),
32
+ CanResolve: new RawContextKey('suggestionCanResolve', false, localize(1543, "Whether the current suggestion supports to resolve further details")),
33
33
  };
34
34
  export const suggestWidgetStatusbarMenu = new MenuId('suggestWidgetStatusBar');
35
35
  export class CompletionItem {
@@ -469,7 +469,7 @@ let SuggestController = class SuggestController {
469
469
  }
470
470
  _alertCompletionItem(item) {
471
471
  if (isNonEmptyArray(item.completion.additionalTextEdits)) {
472
- const msg = nls.localize(1543, "Accepting '{0}' made {1} additional edits", item.textLabel, item.completion.additionalTextEdits.length);
472
+ const msg = nls.localize(1544, "Accepting '{0}' made {1} additional edits", item.textLabel, item.completion.additionalTextEdits.length);
473
473
  alert(msg);
474
474
  }
475
475
  }
@@ -656,7 +656,7 @@ export class TriggerSuggestAction extends EditorAction {
656
656
  constructor() {
657
657
  super({
658
658
  id: TriggerSuggestAction.id,
659
- label: nls.localize2(1552, "Trigger Suggest"),
659
+ label: nls.localize2(1553, "Trigger Suggest"),
660
660
  precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCompletionItemProvider, SuggestContext.Visible.toNegated()),
661
661
  kbOpts: {
662
662
  kbExpr: EditorContextKeys.textInputFocus,
@@ -704,19 +704,19 @@ registerEditorCommand(new SuggestCommand({
704
704
  }],
705
705
  menuOpts: [{
706
706
  menuId: suggestWidgetStatusbarMenu,
707
- title: nls.localize(1544, "Insert"),
707
+ title: nls.localize(1545, "Insert"),
708
708
  group: 'left',
709
709
  order: 1,
710
710
  when: ContextKeyExpr.and(SuggestContext.HasFocusedSuggestion, SuggestContext.HasInsertAndReplaceRange.toNegated())
711
711
  }, {
712
712
  menuId: suggestWidgetStatusbarMenu,
713
- title: nls.localize(1545, "Insert"),
713
+ title: nls.localize(1546, "Insert"),
714
714
  group: 'left',
715
715
  order: 1,
716
716
  when: ContextKeyExpr.and(SuggestContext.HasFocusedSuggestion, SuggestContext.HasInsertAndReplaceRange, SuggestContext.InsertMode.isEqualTo('insert'))
717
717
  }, {
718
718
  menuId: suggestWidgetStatusbarMenu,
719
- title: nls.localize(1546, "Replace"),
719
+ title: nls.localize(1547, "Replace"),
720
720
  group: 'left',
721
721
  order: 1,
722
722
  when: ContextKeyExpr.and(SuggestContext.HasFocusedSuggestion, SuggestContext.HasInsertAndReplaceRange, SuggestContext.InsertMode.isEqualTo('replace'))
@@ -739,13 +739,13 @@ registerEditorCommand(new SuggestCommand({
739
739
  group: 'left',
740
740
  order: 2,
741
741
  when: ContextKeyExpr.and(SuggestContext.HasFocusedSuggestion, SuggestContext.HasInsertAndReplaceRange, SuggestContext.InsertMode.isEqualTo('insert')),
742
- title: nls.localize(1547, "Replace")
742
+ title: nls.localize(1548, "Replace")
743
743
  }, {
744
744
  menuId: suggestWidgetStatusbarMenu,
745
745
  group: 'left',
746
746
  order: 2,
747
747
  when: ContextKeyExpr.and(SuggestContext.HasFocusedSuggestion, SuggestContext.HasInsertAndReplaceRange, SuggestContext.InsertMode.isEqualTo('replace')),
748
- title: nls.localize(1548, "Insert")
748
+ title: nls.localize(1549, "Insert")
749
749
  }]
750
750
  }));
751
751
  // continue to support the old command
@@ -777,7 +777,7 @@ registerEditorCommand(new SuggestCommand({
777
777
  group: 'left',
778
778
  order: 0,
779
779
  when: SuggestContext.HasFocusedSuggestion.toNegated(),
780
- title: nls.localize(1549, "Select")
780
+ title: nls.localize(1550, "Select")
781
781
  }
782
782
  }));
783
783
  registerEditorCommand(new SuggestCommand({
@@ -860,13 +860,13 @@ registerEditorCommand(new SuggestCommand({
860
860
  group: 'right',
861
861
  order: 1,
862
862
  when: ContextKeyExpr.and(SuggestContext.DetailsVisible, SuggestContext.CanResolve),
863
- title: nls.localize(1550, "Show Less")
863
+ title: nls.localize(1551, "Show Less")
864
864
  }, {
865
865
  menuId: suggestWidgetStatusbarMenu,
866
866
  group: 'right',
867
867
  order: 1,
868
868
  when: ContextKeyExpr.and(SuggestContext.DetailsVisible.toNegated(), SuggestContext.CanResolve),
869
- title: nls.localize(1551, "Show More")
869
+ title: nls.localize(1552, "Show More")
870
870
  }]
871
871
  }));
872
872
  registerEditorCommand(new SuggestCommand({
@@ -942,7 +942,7 @@ registerEditorAction(class extends EditorAction {
942
942
  constructor() {
943
943
  super({
944
944
  id: 'editor.action.resetSuggestSize',
945
- label: nls.localize2(1553, "Reset Suggest Widget Size"),
945
+ label: nls.localize2(1554, "Reset Suggest Widget Size"),
946
946
  precondition: undefined
947
947
  });
948
948
  }
@@ -100,6 +100,7 @@ let SuggestModel = SuggestModel_1 = class SuggestModel {
100
100
  this._envService = _envService;
101
101
  this._toDispose = new DisposableStore();
102
102
  this._triggerCharacterListener = new DisposableStore();
103
+ this._supportsByTriggerCharacter = new Map();
103
104
  this._triggerQuickSuggest = new TimeoutTimer();
104
105
  this._triggerState = undefined;
105
106
  this._completionDisposables = new DisposableStore();
@@ -145,7 +146,7 @@ let SuggestModel = SuggestModel_1 = class SuggestModel {
145
146
  // allow-any-unicode-next-line
146
147
  // e.g. ¨ + u makes ü but just ¨ cannot be used for filtering
147
148
  if (!editorIsComposing && this._triggerState !== undefined) {
148
- this._refilterCompletionItems();
149
+ this._refilterCompletionItems(true);
149
150
  }
150
151
  }));
151
152
  this._updateTriggerCharacters();
@@ -160,22 +161,22 @@ let SuggestModel = SuggestModel_1 = class SuggestModel {
160
161
  }
161
162
  _updateTriggerCharacters() {
162
163
  this._triggerCharacterListener.clear();
164
+ this._supportsByTriggerCharacter.clear();
163
165
  if (this._editor.getOption(106 /* EditorOption.readOnly */)
164
166
  || !this._editor.hasModel()
165
167
  || !this._editor.getOption(140 /* EditorOption.suggestOnTriggerCharacters */)) {
166
168
  return;
167
169
  }
168
- const supportsByTriggerCharacter = new Map();
169
170
  for (const support of this._languageFeaturesService.completionProvider.all(this._editor.getModel())) {
170
171
  for (const ch of support.triggerCharacters || []) {
171
- let set = supportsByTriggerCharacter.get(ch);
172
+ let set = this._supportsByTriggerCharacter.get(ch);
172
173
  if (!set) {
173
174
  set = new Set();
174
175
  const suggestSupport = getSnippetSuggestSupport();
175
176
  if (suggestSupport) {
176
177
  set.add(suggestSupport);
177
178
  }
178
- supportsByTriggerCharacter.set(ch, set);
179
+ this._supportsByTriggerCharacter.set(ch, set);
179
180
  }
180
181
  set.add(support);
181
182
  }
@@ -194,39 +195,47 @@ let SuggestModel = SuggestModel_1 = class SuggestModel {
194
195
  const model = this._editor.getModel();
195
196
  text = model.getLineContent(position.lineNumber).substr(0, position.column - 1);
196
197
  }
197
- let lastChar = '';
198
- if (isLowSurrogate(text.charCodeAt(text.length - 1))) {
199
- if (isHighSurrogate(text.charCodeAt(text.length - 2))) {
200
- lastChar = text.substr(text.length - 2);
201
- }
198
+ this._triggerOnLastCharacter(text);
199
+ };
200
+ this._triggerCharacterListener.add(this._editor.onDidType(checkTriggerCharacter));
201
+ this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(() => checkTriggerCharacter()));
202
+ }
203
+ /**
204
+ * Triggers the providers of the last character of the given text, as typing that character
205
+ * does. Returns `false` when it isn't a trigger character.
206
+ */
207
+ _triggerOnLastCharacter(text) {
208
+ let lastChar = '';
209
+ if (isLowSurrogate(text.charCodeAt(text.length - 1))) {
210
+ if (isHighSurrogate(text.charCodeAt(text.length - 2))) {
211
+ lastChar = text.substr(text.length - 2);
202
212
  }
203
- else {
204
- lastChar = text.charAt(text.length - 1);
205
- }
206
- const supports = supportsByTriggerCharacter.get(lastChar);
207
- if (supports) {
208
- // keep existing items that where not computed by the
209
- // supports/providers that want to trigger now
210
- const providerItemsToReuse = new Map();
211
- if (this._completionModel) {
212
- for (const [provider, items] of this._completionModel.getItemsByProvider()) {
213
- if (!supports.has(provider)) {
214
- providerItemsToReuse.set(provider, items);
215
- }
213
+ }
214
+ else {
215
+ lastChar = text.charAt(text.length - 1);
216
+ }
217
+ const supports = this._supportsByTriggerCharacter.get(lastChar);
218
+ if (supports) {
219
+ // keep existing items that where not computed by the
220
+ // supports/providers that want to trigger now
221
+ const providerItemsToReuse = new Map();
222
+ if (this._completionModel) {
223
+ for (const [provider, items] of this._completionModel.getItemsByProvider()) {
224
+ if (!supports.has(provider)) {
225
+ providerItemsToReuse.set(provider, items);
216
226
  }
217
227
  }
218
- this.trigger({
219
- auto: true,
220
- triggerKind: 1 /* CompletionTriggerKind.TriggerCharacter */,
221
- triggerCharacter: lastChar,
222
- retrigger: Boolean(this._completionModel),
223
- clipboardText: this._completionModel?.clipboardText,
224
- completionOptions: { providerFilter: supports, providerItemsToReuse }
225
- });
226
228
  }
227
- };
228
- this._triggerCharacterListener.add(this._editor.onDidType(checkTriggerCharacter));
229
- this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(() => checkTriggerCharacter()));
229
+ this.trigger({
230
+ auto: true,
231
+ triggerKind: 1 /* CompletionTriggerKind.TriggerCharacter */,
232
+ triggerCharacter: lastChar,
233
+ retrigger: Boolean(this._completionModel),
234
+ clipboardText: this._completionModel?.clipboardText,
235
+ completionOptions: { providerFilter: supports, providerItemsToReuse }
236
+ });
237
+ }
238
+ return Boolean(supports);
230
239
  }
231
240
  // --- trigger/retrigger/cancel suggest
232
241
  get state() {
@@ -244,6 +253,7 @@ let SuggestModel = SuggestModel_1 = class SuggestModel {
244
253
  this._triggerQuickSuggest.cancel();
245
254
  this._waitForInlineCompletions?.dispose();
246
255
  this._waitForInlineCompletions = undefined;
256
+ this._closedWithoutMatch = undefined;
247
257
  if (this._triggerState !== undefined) {
248
258
  this._requestToken?.cancel();
249
259
  this._requestToken = undefined;
@@ -285,12 +295,20 @@ let SuggestModel = SuggestModel_1 = class SuggestModel {
285
295
  // cursor did move RIGHT due to typing -> trigger quick suggest
286
296
  this._doTriggerQuickSuggest();
287
297
  }
298
+ else if (e.source === 'deleteLeft') {
299
+ // cursor did move LEFT due to Backspace -> bring back suggestions that closed because nothing matched
300
+ this._reopenAfterDelete();
301
+ }
288
302
  }
289
303
  else if (this._triggerState !== undefined && e.reason === 3 /* CursorChangeReason.Explicit */) {
290
304
  // suggest is active and something like cursor keys are used to move
291
305
  // the cursor. this means we can refilter at the new position
292
306
  this._refilterCompletionItems();
293
307
  }
308
+ else if (e.reason === 3 /* CursorChangeReason.Explicit */) {
309
+ // suggest is inactive and the cursor moved away from where it closed
310
+ this._closedWithoutMatch = undefined;
311
+ }
294
312
  }
295
313
  _onCompositionEnd() {
296
314
  // trigger or refilter when composition ends
@@ -301,6 +319,38 @@ let SuggestModel = SuggestModel_1 = class SuggestModel {
301
319
  this._refilterCompletionItems();
302
320
  }
303
321
  }
322
+ /**
323
+ * Brings back automatic suggestions that closed because nothing matched what was typed,
324
+ * when Backspace keeps the cursor in that text. It does what Backspace does while they show.
325
+ */
326
+ _reopenAfterDelete() {
327
+ const closed = this._closedWithoutMatch;
328
+ this._closedWithoutMatch = undefined;
329
+ if (!closed || !this._editor.hasModel() || !this._editor.getOption(137 /* EditorOption.suggest */).reopenOnDelete) {
330
+ return;
331
+ }
332
+ const ctx = new LineContext(this._editor.getModel(), this._editor.getPosition(), { auto: true });
333
+ const text = ctx.leadingLineContent.slice(closed.prefix.length);
334
+ if (ctx.lineNumber !== closed.lineNumber || !ctx.leadingLineContent.startsWith(closed.prefix) || !text || /\s/.test(text)) {
335
+ // deleted all of that text, or typed past it
336
+ return;
337
+ }
338
+ if (!ctx.leadingWord.word) {
339
+ this._reopenOnTriggerCharacter(ctx);
340
+ }
341
+ else if (canShowQuickSuggest(this._editor, this._contextKeyService, this._configurationService)) {
342
+ this.trigger({ auto: true });
343
+ }
344
+ }
345
+ /**
346
+ * With `editor.suggest.reopenOnDelete`, triggers the providers of the trigger character
347
+ * before the cursor, as typing it does. Returns `false` when it doesn't.
348
+ */
349
+ _reopenOnTriggerCharacter(ctx) {
350
+ return this._editor.getOption(137 /* EditorOption.suggest */).reopenOnDelete
351
+ && canShowSuggestOnTriggerCharacters(this._editor, this._contextKeyService, this._configurationService)
352
+ && this._triggerOnLastCharacter(ctx.leadingLineContent);
353
+ }
304
354
  _doTriggerQuickSuggest() {
305
355
  if (QuickSuggestionsOptions.isAllOff(this._editor.getOption(104 /* EditorOption.quickSuggestions */))) {
306
356
  // not enabled
@@ -422,13 +472,13 @@ let SuggestModel = SuggestModel_1 = class SuggestModel {
422
472
  triggerAndCleanUp(!currentState);
423
473
  });
424
474
  }
425
- _refilterCompletionItems() {
475
+ _refilterCompletionItems(contentChanged = false) {
426
476
  assertType(this._editor.hasModel());
427
477
  assertType(this._triggerState !== undefined);
428
478
  const model = this._editor.getModel();
429
479
  const position = this._editor.getPosition();
430
480
  const ctx = new LineContext(model, position, { ...this._triggerState, refilter: true });
431
- this._onNewContext(ctx);
481
+ this._onNewContext(ctx, contentChanged);
432
482
  }
433
483
  trigger(options) {
434
484
  if (!this._editor.hasModel()) {
@@ -623,7 +673,7 @@ let SuggestModel = SuggestModel_1 = class SuggestModel {
623
673
  }
624
674
  return { itemKind: result, showDeprecated: suggestOptions.showDeprecated };
625
675
  }
626
- _onNewContext(ctx) {
676
+ _onNewContext(ctx, contentChanged = false) {
627
677
  if (!this._context) {
628
678
  // happens when 24x7 IntelliSense is enabled and still in its delay
629
679
  return;
@@ -640,11 +690,12 @@ let SuggestModel = SuggestModel_1 = class SuggestModel {
640
690
  return;
641
691
  }
642
692
  if (ctx.column < this._context.column) {
643
- // typed -> moved cursor LEFT -> retrigger if still on a word
693
+ // typed -> moved cursor LEFT -> retrigger if still on a word,
694
+ // or if deleted back to a trigger character, as typing it does
644
695
  if (ctx.leadingWord.word) {
645
696
  this.trigger({ auto: this._context.triggerOptions.auto, retrigger: true });
646
697
  }
647
- else {
698
+ else if (!contentChanged || !this._reopenOnTriggerCharacter(ctx)) {
648
699
  this.cancel();
649
700
  }
650
701
  return;
@@ -724,6 +775,10 @@ let SuggestModel = SuggestModel_1 = class SuggestModel {
724
775
  else {
725
776
  // nothing left
726
777
  this.cancel();
778
+ if (this._editor.getOption(137 /* EditorOption.suggest */).reopenOnDelete) {
779
+ // remember the text that nothing matched, and whitespace typed after it, for Backspace
780
+ this._closedWithoutMatch = { lineNumber: ctx.lineNumber, prefix: ctx.leadingLineContent.slice(0, ctx.leadingLineContent.search(/\S*\s*$/)) };
781
+ }
727
782
  return;
728
783
  }
729
784
  }