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

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 (337) 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 +34 -2
  18. package/esm/vs/base/browser/dom.js +1 -4
  19. package/esm/vs/base/browser/dom.js.map +1 -1
  20. package/esm/vs/base/browser/markdownRenderer.js +25 -11
  21. package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
  22. package/esm/vs/base/browser/ui/button/button.js +15 -8
  23. package/esm/vs/base/browser/ui/button/button.js.map +1 -1
  24. package/esm/vs/base/browser/ui/codicons/codicon/codicon-modifiers.css +3 -8
  25. package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  26. package/esm/vs/base/browser/ui/list/list.css +1 -0
  27. package/esm/vs/base/browser/ui/toolbar/toolbar.js +3 -0
  28. package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
  29. package/esm/vs/base/common/async.js +11 -0
  30. package/esm/vs/base/common/async.js.map +1 -1
  31. package/esm/vs/base/common/codiconsLibrary.js +11 -2
  32. package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
  33. package/esm/vs/base/common/defaultAccount.js +6 -0
  34. package/esm/vs/base/common/defaultAccount.js.map +1 -0
  35. package/esm/vs/base/common/equals.js +73 -24
  36. package/esm/vs/base/common/equals.js.map +1 -1
  37. package/esm/vs/base/common/event.js +14 -4
  38. package/esm/vs/base/common/event.js.map +1 -1
  39. package/esm/vs/base/common/iterator.js.map +1 -1
  40. package/esm/vs/base/common/keybindings.js +0 -8
  41. package/esm/vs/base/common/keybindings.js.map +1 -1
  42. package/esm/vs/base/common/lifecycle.js +2 -2
  43. package/esm/vs/base/common/lifecycle.js.map +1 -1
  44. package/esm/vs/base/common/marshallingIds.js.map +1 -1
  45. package/esm/vs/base/common/observableInternal/index.js +1 -1
  46. package/esm/vs/base/common/observableInternal/index.js.map +1 -1
  47. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js +1 -1
  48. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
  49. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js +16 -0
  50. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
  51. package/esm/vs/base/common/observableInternal/utils/utils.js +11 -0
  52. package/esm/vs/base/common/observableInternal/utils/utils.js.map +1 -1
  53. package/esm/vs/base/common/product.js.map +1 -1
  54. package/esm/vs/base/common/strings.js +3 -1
  55. package/esm/vs/base/common/strings.js.map +1 -1
  56. package/esm/vs/editor/browser/controller/dragScrolling.js +2 -1
  57. package/esm/vs/editor/browser/controller/dragScrolling.js.map +1 -1
  58. package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js +73 -2
  59. package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js.map +1 -1
  60. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +7 -51
  61. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
  62. package/esm/vs/editor/browser/controller/editContext/screenReaderUtils.js.map +1 -1
  63. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +7 -20
  64. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js.map +1 -1
  65. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js +14 -44
  66. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js.map +1 -1
  67. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry.js +19 -0
  68. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry.js.map +1 -0
  69. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.js +14 -1
  70. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.js.map +1 -1
  71. package/esm/vs/editor/browser/controller/mouseHandler.js +5 -2
  72. package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
  73. package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
  74. package/esm/vs/editor/browser/observableCodeEditor.js +32 -15
  75. package/esm/vs/editor/browser/observableCodeEditor.js.map +1 -1
  76. package/esm/vs/editor/browser/view.js +11 -2
  77. package/esm/vs/editor/browser/view.js.map +1 -1
  78. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +5 -2
  79. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
  80. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +10 -0
  81. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
  82. package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js.map +1 -1
  83. package/esm/vs/editor/browser/widget/multiDiffEditor/style.css +48 -0
  84. package/esm/vs/editor/common/config/fontInfo.js +1 -1
  85. package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
  86. package/esm/vs/editor/common/core/edits/edit.js +19 -0
  87. package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
  88. package/esm/vs/editor/common/core/edits/stringEdit.js +13 -0
  89. package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
  90. package/esm/vs/editor/common/core/edits/textEdit.js.map +1 -1
  91. package/esm/vs/editor/common/core/text/positionToOffsetImpl.js +24 -10
  92. package/esm/vs/editor/common/core/text/positionToOffsetImpl.js.map +1 -1
  93. package/esm/vs/editor/common/cursor/cursorMoveCommands.js +4 -4
  94. package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
  95. package/esm/vs/editor/common/cursor/cursorWordOperations.js +6 -3
  96. package/esm/vs/editor/common/cursor/cursorWordOperations.js.map +1 -1
  97. package/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js +2 -2
  98. package/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js.map +1 -1
  99. package/esm/vs/editor/common/languages/nullTokenize.js +1 -1
  100. package/esm/vs/editor/common/languages/nullTokenize.js.map +1 -1
  101. package/esm/vs/editor/common/languages/supports/tokenization.js +3 -0
  102. package/esm/vs/editor/common/languages/supports/tokenization.js.map +1 -1
  103. package/esm/vs/editor/common/languages.js +2 -1
  104. package/esm/vs/editor/common/languages.js.map +1 -1
  105. package/esm/vs/editor/common/model/decorationProvider.js +21 -1
  106. package/esm/vs/editor/common/model/decorationProvider.js.map +1 -1
  107. package/esm/vs/editor/common/model/textModel.js +49 -30
  108. package/esm/vs/editor/common/model/textModel.js.map +1 -1
  109. package/esm/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js +6 -3
  110. package/esm/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js.map +1 -1
  111. package/esm/vs/editor/common/model/tokens/annotations.js +177 -0
  112. package/esm/vs/editor/common/model/tokens/annotations.js.map +1 -0
  113. package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js +131 -0
  114. package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js.map +1 -0
  115. package/esm/vs/editor/common/model/tokens/tokenizationTextModelPart.js +9 -0
  116. package/esm/vs/editor/common/model/tokens/tokenizationTextModelPart.js.map +1 -1
  117. package/esm/vs/editor/common/model/tokens/tokenizerSyntaxTokenBackend.js +9 -0
  118. package/esm/vs/editor/common/model/tokens/tokenizerSyntaxTokenBackend.js.map +1 -1
  119. package/esm/vs/editor/common/textModelEditSource.js +2 -0
  120. package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
  121. package/esm/vs/editor/common/textModelEvents.js.map +1 -1
  122. package/esm/vs/editor/common/viewLayout/lineDecorations.js.map +1 -1
  123. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +1 -1
  124. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
  125. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +54 -36
  126. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js.map +1 -1
  127. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +14 -1
  128. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js.map +1 -1
  129. package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +1 -1
  130. package/esm/vs/editor/contrib/hover/browser/hover.css +1 -1
  131. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +1 -1
  132. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
  133. package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
  134. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +1 -0
  135. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
  136. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commandIds.js +2 -0
  137. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commandIds.js.map +1 -1
  138. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +33 -4
  139. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js.map +1 -1
  140. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +13 -12
  141. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js.map +1 -1
  142. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +7 -1
  143. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js.map +1 -1
  144. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
  145. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
  146. package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js +2 -1
  147. package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js.map +1 -1
  148. package/esm/vs/editor/contrib/inlineCompletions/browser/model/InlineSuggestAlternativeAction.js +8 -0
  149. package/esm/vs/editor/contrib/inlineCompletions/browser/model/InlineSuggestAlternativeAction.js.map +1 -0
  150. package/esm/vs/editor/contrib/inlineCompletions/browser/model/editKind.js +198 -0
  151. package/esm/vs/editor/contrib/inlineCompletions/browser/model/editKind.js.map +1 -0
  152. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionIsVisible.js +40 -0
  153. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionIsVisible.js.map +1 -0
  154. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +128 -65
  155. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
  156. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +69 -13
  157. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
  158. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +159 -94
  159. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js.map +1 -1
  160. package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js +124 -50
  161. package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js.map +1 -1
  162. package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +393 -0
  163. package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js.map +1 -0
  164. package/esm/vs/editor/contrib/inlineCompletions/browser/telemetry.js.map +1 -1
  165. package/esm/vs/editor/contrib/inlineCompletions/browser/utils.js +20 -0
  166. package/esm/vs/editor/contrib/inlineCompletions/browser/utils.js.map +1 -1
  167. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +59 -42
  168. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
  169. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +29 -8
  170. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
  171. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +78 -46
  172. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
  173. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js +9 -4
  174. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js.map +1 -1
  175. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +11 -4
  176. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
  177. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +81 -41
  178. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
  179. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js +48 -0
  180. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js.map +1 -1
  181. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +18 -15
  182. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
  183. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js +3 -4
  184. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js.map +1 -1
  185. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js +6 -7
  186. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js.map +1 -1
  187. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js +4 -5
  188. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js.map +1 -1
  189. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +4 -3
  190. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js.map +1 -1
  191. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js +8 -8
  192. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js.map +1 -1
  193. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js +9 -7
  194. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js.map +1 -1
  195. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +203 -41
  196. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js.map +1 -1
  197. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.js +189 -0
  198. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.js.map +1 -0
  199. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js +85 -102
  200. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -1
  201. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js +75 -32
  202. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js.map +1 -1
  203. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistnaceWidgetPlacement.js +121 -0
  204. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistnaceWidgetPlacement.js.map +1 -0
  205. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js +2 -1
  206. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js.map +1 -1
  207. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +22 -20
  208. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js.map +1 -1
  209. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js +15 -5
  210. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js.map +1 -1
  211. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.css +39 -6
  212. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js +10 -5
  213. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js.map +1 -1
  214. package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
  215. package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  216. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +32 -32
  217. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js.map +1 -1
  218. package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
  219. package/esm/vs/editor/contrib/links/browser/links.js +10 -10
  220. package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
  221. package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
  222. package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
  223. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
  224. package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
  225. package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
  226. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +11 -11
  227. package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
  228. package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
  229. package/esm/vs/editor/contrib/rename/browser/rename.js +19 -11
  230. package/esm/vs/editor/contrib/rename/browser/rename.js.map +1 -1
  231. package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
  232. package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js +3 -2
  233. package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js.map +1 -1
  234. package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
  235. package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
  236. package/esm/vs/editor/contrib/snippet/browser/snippetParser.js +33 -0
  237. package/esm/vs/editor/contrib/snippet/browser/snippetParser.js.map +1 -1
  238. package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  239. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  240. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +12 -4
  241. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js.map +1 -1
  242. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +1 -0
  243. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js.map +1 -1
  244. package/esm/vs/editor/contrib/suggest/browser/suggest.js +9 -8
  245. package/esm/vs/editor/contrib/suggest/browser/suggest.js.map +1 -1
  246. package/esm/vs/editor/contrib/suggest/browser/suggestController.js +39 -28
  247. package/esm/vs/editor/contrib/suggest/browser/suggestController.js.map +1 -1
  248. package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +1 -0
  249. package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js.map +1 -1
  250. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +22 -18
  251. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js.map +1 -1
  252. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +28 -6
  253. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js.map +1 -1
  254. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
  255. package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
  256. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  257. package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  258. package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  259. package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
  260. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
  261. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
  262. package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  263. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
  264. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +19 -2
  265. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js.map +1 -1
  266. package/esm/vs/editor/editor.api.d.ts +37 -2
  267. package/esm/vs/editor/standalone/browser/standaloneLanguages.js +2 -2
  268. package/esm/vs/editor/standalone/browser/standaloneLanguages.js.map +1 -1
  269. package/esm/vs/editor/standalone/browser/standaloneServices.js +11 -1
  270. package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
  271. package/esm/vs/editor/standalone/common/monarch/monarchLexer.js +1 -1
  272. package/esm/vs/editor/standalone/common/monarch/monarchLexer.js.map +1 -1
  273. package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
  274. package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
  275. package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
  276. package/esm/vs/platform/actionWidget/browser/actionWidget.css +11 -8
  277. package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
  278. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
  279. package/esm/vs/platform/actions/browser/toolbar.js +2 -2
  280. package/esm/vs/platform/actions/common/actions.js +11 -4
  281. package/esm/vs/platform/actions/common/actions.js.map +1 -1
  282. package/esm/vs/platform/actions/common/menuService.js +2 -2
  283. package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
  284. package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
  285. package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
  286. package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
  287. package/esm/vs/platform/contextkey/common/scanner.js +5 -5
  288. package/esm/vs/platform/{product/common/productService.js → defaultAccount/common/defaultAccount.js} +2 -2
  289. package/esm/vs/platform/defaultAccount/common/defaultAccount.js.map +1 -0
  290. package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  291. package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
  292. package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
  293. package/esm/vs/platform/instantiation/common/instantiation.js.map +1 -1
  294. package/esm/vs/platform/instantiation/common/instantiationService.js +1 -8
  295. package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
  296. package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
  297. package/esm/vs/platform/list/browser/listService.js +27 -27
  298. package/esm/vs/platform/log/common/log.js +1 -1
  299. package/esm/vs/platform/log/common/log.js.map +1 -1
  300. package/esm/vs/platform/markers/common/markerService.js +6 -6
  301. package/esm/vs/platform/markers/common/markerService.js.map +1 -1
  302. package/esm/vs/platform/markers/common/markers.js +6 -6
  303. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +8 -8
  304. package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
  305. package/esm/vs/platform/quickinput/browser/media/quickInput.css +7 -3
  306. package/esm/vs/platform/quickinput/browser/quickInput.js +19 -11
  307. package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
  308. package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
  309. package/esm/vs/platform/quickinput/browser/quickInputController.js +6 -6
  310. package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
  311. package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  312. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  313. package/esm/vs/platform/theme/common/colorUtils.js +2 -2
  314. package/esm/vs/platform/theme/common/colors/baseColors.js +18 -17
  315. package/esm/vs/platform/theme/common/colors/baseColors.js.map +1 -1
  316. package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
  317. package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
  318. package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
  319. package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
  320. package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
  321. package/esm/vs/platform/theme/common/colors/minimapColors.js +13 -13
  322. package/esm/vs/platform/theme/common/colors/minimapColors.js.map +1 -1
  323. package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
  324. package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
  325. package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
  326. package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
  327. package/esm/vs/platform/undoRedo/common/undoRedoService.js +21 -21
  328. package/esm/vs/platform/undoRedo/common/undoRedoService.js.map +1 -1
  329. package/esm/vs/platform/window/common/window.js +1 -1
  330. package/esm/vs/platform/window/common/window.js.map +1 -1
  331. package/esm/vs/platform/workspace/common/workspace.js +1 -1
  332. package/monaco.d.ts +37 -2
  333. package/package.json +2 -2
  334. package/version.txt +1 -1
  335. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js +0 -16
  336. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js.map +0 -1
  337. package/esm/vs/platform/product/common/productService.js.map +0 -1
@@ -36,7 +36,7 @@ import { Action2, registerAction2 } from '../../../../platform/actions/common/ac
36
36
  import { safeIntl } from '../../../../base/common/date.js';
37
37
  import { isModelDecorationInComment, isModelDecorationInString, isModelDecorationVisible } from '../../../common/viewModel/viewModelDecoration.js';
38
38
  import { IMarkdownRendererService } from '../../../../platform/markdown/browser/markdownRenderer.js';
39
- export const warningIcon = registerIcon('extensions-warning-message', Codicon.warning, nls.localize(1541, 'Icon shown with a warning message in the extensions editor.'));
39
+ export const warningIcon = registerIcon('extensions-warning-message', Codicon.warning, nls.localize(1550, 'Icon shown with a warning message in the extensions editor.'));
40
40
  let UnicodeHighlighter = class UnicodeHighlighter extends Disposable {
41
41
  static { this.ID = 'editor.contrib.unicodeHighlighter'; }
42
42
  constructor(_editor, _editorWorkerService, _workspaceTrustService, instantiationService) {
@@ -56,19 +56,19 @@ let UnicodeHighlighter = class UnicodeHighlighter extends Disposable {
56
56
  let data;
57
57
  if (state.nonBasicAsciiCharacterCount >= max) {
58
58
  data = {
59
- message: nls.localize(1542, 'This document contains many non-basic ASCII unicode characters'),
59
+ message: nls.localize(1551, 'This document contains many non-basic ASCII unicode characters'),
60
60
  command: new DisableHighlightingOfNonBasicAsciiCharactersAction(),
61
61
  };
62
62
  }
63
63
  else if (state.ambiguousCharacterCount >= max) {
64
64
  data = {
65
- message: nls.localize(1543, 'This document contains many ambiguous unicode characters'),
65
+ message: nls.localize(1552, 'This document contains many ambiguous unicode characters'),
66
66
  command: new DisableHighlightingOfAmbiguousCharactersAction(),
67
67
  };
68
68
  }
69
69
  else if (state.invisibleCharacterCount >= max) {
70
70
  data = {
71
- message: nls.localize(1544, 'This document contains many invisible unicode characters'),
71
+ message: nls.localize(1553, 'This document contains many invisible unicode characters'),
72
72
  command: new DisableHighlightingOfInvisibleCharactersAction(),
73
73
  };
74
74
  }
@@ -337,7 +337,7 @@ class ViewportUnicodeHighlighter extends Disposable {
337
337
  };
338
338
  }
339
339
  }
340
- const configureUnicodeHighlightOptionsStr = nls.localize(1545, 'Configure Unicode Highlight Options');
340
+ const configureUnicodeHighlightOptionsStr = nls.localize(1554, 'Configure Unicode Highlight Options');
341
341
  let UnicodeHighlighterHoverParticipant = class UnicodeHighlighterHoverParticipant {
342
342
  constructor(_editor, _markdownRendererService) {
343
343
  this._editor = _editor;
@@ -369,18 +369,18 @@ let UnicodeHighlighterHoverParticipant = class UnicodeHighlighterHoverParticipan
369
369
  switch (highlightInfo.reason.kind) {
370
370
  case 0 /* UnicodeHighlighterReasonKind.Ambiguous */: {
371
371
  if (isBasicASCII(highlightInfo.reason.confusableWith)) {
372
- reason = nls.localize(1546, 'The character {0} could be confused with the ASCII character {1}, which is more common in source code.', codePointStr, formatCodePointMarkdown(highlightInfo.reason.confusableWith.codePointAt(0)));
372
+ reason = nls.localize(1555, 'The character {0} could be confused with the ASCII character {1}, which is more common in source code.', codePointStr, formatCodePointMarkdown(highlightInfo.reason.confusableWith.codePointAt(0)));
373
373
  }
374
374
  else {
375
- reason = nls.localize(1547, 'The character {0} could be confused with the character {1}, which is more common in source code.', codePointStr, formatCodePointMarkdown(highlightInfo.reason.confusableWith.codePointAt(0)));
375
+ reason = nls.localize(1556, 'The character {0} could be confused with the character {1}, which is more common in source code.', codePointStr, formatCodePointMarkdown(highlightInfo.reason.confusableWith.codePointAt(0)));
376
376
  }
377
377
  break;
378
378
  }
379
379
  case 1 /* UnicodeHighlighterReasonKind.Invisible */:
380
- reason = nls.localize(1548, 'The character {0} is invisible.', codePointStr);
380
+ reason = nls.localize(1557, 'The character {0} is invisible.', codePointStr);
381
381
  break;
382
382
  case 2 /* UnicodeHighlighterReasonKind.NonBasicAscii */:
383
- reason = nls.localize(1549, 'The character {0} is not a basic ASCII character.', codePointStr);
383
+ reason = nls.localize(1558, 'The character {0} is not a basic ASCII character.', codePointStr);
384
384
  break;
385
385
  }
386
386
  if (existedReason.has(reason)) {
@@ -393,7 +393,7 @@ let UnicodeHighlighterHoverParticipant = class UnicodeHighlighterHoverParticipan
393
393
  inComment: highlightInfo.inComment,
394
394
  inString: highlightInfo.inString,
395
395
  };
396
- const adjustSettings = nls.localize(1550, 'Adjust settings');
396
+ const adjustSettings = nls.localize(1559, 'Adjust settings');
397
397
  const uri = createCommandUri(ShowExcludeOptions.ID, adjustSettingsArgs);
398
398
  const markdown = new MarkdownString('', true)
399
399
  .appendMarkdown(reason)
@@ -465,10 +465,10 @@ export class DisableHighlightingInCommentsAction extends EditorAction {
465
465
  constructor() {
466
466
  super({
467
467
  id: DisableHighlightingOfAmbiguousCharactersAction.ID,
468
- label: nls.localize2(1559, "Disable highlighting of characters in comments"),
468
+ label: nls.localize2(1568, "Disable highlighting of characters in comments"),
469
469
  precondition: undefined
470
470
  });
471
- this.shortLabel = nls.localize(1551, 'Disable Highlight In Comments');
471
+ this.shortLabel = nls.localize(1560, 'Disable Highlight In Comments');
472
472
  }
473
473
  async run(accessor, editor) {
474
474
  const configurationService = accessor.get(IConfigurationService);
@@ -484,10 +484,10 @@ export class DisableHighlightingInStringsAction extends EditorAction {
484
484
  constructor() {
485
485
  super({
486
486
  id: DisableHighlightingOfAmbiguousCharactersAction.ID,
487
- label: nls.localize2(1560, "Disable highlighting of characters in strings"),
487
+ label: nls.localize2(1569, "Disable highlighting of characters in strings"),
488
488
  precondition: undefined
489
489
  });
490
- this.shortLabel = nls.localize(1552, 'Disable Highlight In Strings');
490
+ this.shortLabel = nls.localize(1561, 'Disable Highlight In Strings');
491
491
  }
492
492
  async run(accessor, editor) {
493
493
  const configurationService = accessor.get(IConfigurationService);
@@ -504,11 +504,11 @@ export class DisableHighlightingOfAmbiguousCharactersAction extends Action2 {
504
504
  constructor() {
505
505
  super({
506
506
  id: DisableHighlightingOfAmbiguousCharactersAction.ID,
507
- title: nls.localize2(1561, "Disable highlighting of ambiguous characters"),
507
+ title: nls.localize2(1570, "Disable highlighting of ambiguous characters"),
508
508
  precondition: undefined,
509
509
  f1: false,
510
510
  });
511
- this.shortLabel = nls.localize(1553, 'Disable Ambiguous Highlight');
511
+ this.shortLabel = nls.localize(1562, 'Disable Ambiguous Highlight');
512
512
  }
513
513
  async run(accessor, editor) {
514
514
  const configurationService = accessor.get(IConfigurationService);
@@ -525,11 +525,11 @@ export class DisableHighlightingOfInvisibleCharactersAction extends Action2 {
525
525
  constructor() {
526
526
  super({
527
527
  id: DisableHighlightingOfInvisibleCharactersAction.ID,
528
- title: nls.localize2(1562, "Disable highlighting of invisible characters"),
528
+ title: nls.localize2(1571, "Disable highlighting of invisible characters"),
529
529
  precondition: undefined,
530
530
  f1: false,
531
531
  });
532
- this.shortLabel = nls.localize(1554, 'Disable Invisible Highlight');
532
+ this.shortLabel = nls.localize(1563, 'Disable Invisible Highlight');
533
533
  }
534
534
  async run(accessor, editor) {
535
535
  const configurationService = accessor.get(IConfigurationService);
@@ -546,11 +546,11 @@ export class DisableHighlightingOfNonBasicAsciiCharactersAction extends Action2
546
546
  constructor() {
547
547
  super({
548
548
  id: DisableHighlightingOfNonBasicAsciiCharactersAction.ID,
549
- title: nls.localize2(1563, "Disable highlighting of non basic ASCII characters"),
549
+ title: nls.localize2(1572, "Disable highlighting of non basic ASCII characters"),
550
550
  precondition: undefined,
551
551
  f1: false,
552
552
  });
553
- this.shortLabel = nls.localize(1555, 'Disable Non ASCII Highlight');
553
+ this.shortLabel = nls.localize(1564, 'Disable Non ASCII Highlight');
554
554
  }
555
555
  async run(accessor, editor) {
556
556
  const configurationService = accessor.get(IConfigurationService);
@@ -567,7 +567,7 @@ export class ShowExcludeOptions extends Action2 {
567
567
  constructor() {
568
568
  super({
569
569
  id: ShowExcludeOptions.ID,
570
- title: nls.localize2(1564, "Show Exclude Options"),
570
+ title: nls.localize2(1573, "Show Exclude Options"),
571
571
  precondition: undefined,
572
572
  f1: false,
573
573
  });
@@ -579,15 +579,15 @@ export class ShowExcludeOptions extends Action2 {
579
579
  const configurationService = accessor.get(IConfigurationService);
580
580
  function getExcludeCharFromBeingHighlightedLabel(codePoint) {
581
581
  if (InvisibleCharacters.isInvisibleCharacter(codePoint)) {
582
- return nls.localize(1556, 'Exclude {0} (invisible character) from being highlighted', codePointToHex(codePoint));
582
+ return nls.localize(1565, 'Exclude {0} (invisible character) from being highlighted', codePointToHex(codePoint));
583
583
  }
584
- return nls.localize(1557, 'Exclude {0} from being highlighted', `${codePointToHex(codePoint)} "${char}"`);
584
+ return nls.localize(1566, 'Exclude {0} from being highlighted', `${codePointToHex(codePoint)} "${char}"`);
585
585
  }
586
586
  const options = [];
587
587
  if (reason.kind === 0 /* UnicodeHighlighterReasonKind.Ambiguous */) {
588
588
  for (const locale of reason.notAmbiguousInLocales) {
589
589
  options.push({
590
- label: nls.localize(1558, "Allow unicode characters that are more common in the language \"{0}\".", locale),
590
+ label: nls.localize(1567, "Allow unicode characters that are more common in the language \"{0}\".", locale),
591
591
  run: async () => {
592
592
  excludeLocaleFromBeingHighlighted(configurationService, [locale]);
593
593
  },
@@ -85,11 +85,11 @@ let UnusualLineTerminatorsDetector = class UnusualLineTerminatorsDetector extend
85
85
  try {
86
86
  this._isPresentingDialog = true;
87
87
  result = await this._dialogService.confirm({
88
- title: nls.localize(1565, "Unusual Line Terminators"),
89
- message: nls.localize(1566, "Detected unusual line terminators"),
90
- detail: nls.localize(1567, "The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.", basename(model.uri)),
91
- primaryButton: nls.localize(1568, "&&Remove Unusual Line Terminators"),
92
- cancelButton: nls.localize(1569, "Ignore")
88
+ title: nls.localize(1574, "Unusual Line Terminators"),
89
+ message: nls.localize(1575, "Detected unusual line terminators"),
90
+ detail: nls.localize(1576, "The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.", basename(model.uri)),
91
+ primaryButton: nls.localize(1577, "&&Remove Unusual Line Terminators"),
92
+ cancelButton: nls.localize(1578, "Ignore")
93
93
  });
94
94
  }
95
95
  finally {
@@ -9,15 +9,15 @@ import { DocumentHighlightKind } from '../../../common/languages.js';
9
9
  import * as nls from '../../../../nls.js';
10
10
  import { activeContrastBorder, editorSelectionHighlight, minimapSelectionOccurrenceHighlight, overviewRulerSelectionHighlightForeground, registerColor } from '../../../../platform/theme/common/colorRegistry.js';
11
11
  import { registerThemingParticipant, themeColorFromId } from '../../../../platform/theme/common/themeService.js';
12
- const wordHighlightBackground = registerColor('editor.wordHighlightBackground', { dark: '#575757B8', light: '#57575740', hcDark: null, hcLight: null }, nls.localize(1570, 'Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations.'), true);
13
- registerColor('editor.wordHighlightStrongBackground', { dark: '#004972B8', light: '#0e639c40', hcDark: null, hcLight: null }, nls.localize(1571, 'Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations.'), true);
14
- registerColor('editor.wordHighlightTextBackground', wordHighlightBackground, nls.localize(1572, 'Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations.'), true);
15
- const wordHighlightBorder = registerColor('editor.wordHighlightBorder', { light: null, dark: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, nls.localize(1573, 'Border color of a symbol during read-access, like reading a variable.'));
16
- registerColor('editor.wordHighlightStrongBorder', { light: null, dark: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, nls.localize(1574, 'Border color of a symbol during write-access, like writing to a variable.'));
17
- registerColor('editor.wordHighlightTextBorder', wordHighlightBorder, nls.localize(1575, "Border color of a textual occurrence for a symbol."));
18
- const overviewRulerWordHighlightForeground = registerColor('editorOverviewRuler.wordHighlightForeground', '#A0A0A0CC', nls.localize(1576, 'Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations.'), true);
19
- const overviewRulerWordHighlightStrongForeground = registerColor('editorOverviewRuler.wordHighlightStrongForeground', '#C0A0C0CC', nls.localize(1577, 'Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations.'), true);
20
- const overviewRulerWordHighlightTextForeground = registerColor('editorOverviewRuler.wordHighlightTextForeground', overviewRulerSelectionHighlightForeground, nls.localize(1578, 'Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations.'), true);
12
+ const wordHighlightBackground = registerColor('editor.wordHighlightBackground', { dark: '#575757B8', light: '#57575740', hcDark: null, hcLight: null }, nls.localize(1579, 'Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations.'), true);
13
+ registerColor('editor.wordHighlightStrongBackground', { dark: '#004972B8', light: '#0e639c40', hcDark: null, hcLight: null }, nls.localize(1580, 'Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations.'), true);
14
+ registerColor('editor.wordHighlightTextBackground', wordHighlightBackground, nls.localize(1581, 'Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations.'), true);
15
+ const wordHighlightBorder = registerColor('editor.wordHighlightBorder', { light: null, dark: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, nls.localize(1582, 'Border color of a symbol during read-access, like reading a variable.'));
16
+ registerColor('editor.wordHighlightStrongBorder', { light: null, dark: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, nls.localize(1583, 'Border color of a symbol during write-access, like writing to a variable.'));
17
+ registerColor('editor.wordHighlightTextBorder', wordHighlightBorder, nls.localize(1584, "Border color of a textual occurrence for a symbol."));
18
+ const overviewRulerWordHighlightForeground = registerColor('editorOverviewRuler.wordHighlightForeground', '#A0A0A0CC', nls.localize(1585, 'Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations.'), true);
19
+ const overviewRulerWordHighlightStrongForeground = registerColor('editorOverviewRuler.wordHighlightStrongForeground', '#C0A0C0CC', nls.localize(1586, 'Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations.'), true);
20
+ const overviewRulerWordHighlightTextForeground = registerColor('editorOverviewRuler.wordHighlightTextForeground', overviewRulerSelectionHighlightForeground, nls.localize(1587, 'Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations.'), true);
21
21
  const _WRITE_OPTIONS = ModelDecorationOptions.register({
22
22
  description: 'word-highlight-strong',
23
23
  stickiness: 1 /* TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges */,
@@ -742,7 +742,7 @@ class NextWordHighlightAction extends WordHighlightNavigationAction {
742
742
  constructor() {
743
743
  super(true, {
744
744
  id: 'editor.action.wordHighlight.next',
745
- label: nls.localize2(1579, "Go to Next Symbol Highlight"),
745
+ label: nls.localize2(1588, "Go to Next Symbol Highlight"),
746
746
  precondition: ctxHasWordHighlights,
747
747
  kbOpts: {
748
748
  kbExpr: EditorContextKeys.editorTextFocus,
@@ -756,7 +756,7 @@ class PrevWordHighlightAction extends WordHighlightNavigationAction {
756
756
  constructor() {
757
757
  super(false, {
758
758
  id: 'editor.action.wordHighlight.prev',
759
- label: nls.localize2(1580, "Go to Previous Symbol Highlight"),
759
+ label: nls.localize2(1589, "Go to Previous Symbol Highlight"),
760
760
  precondition: ctxHasWordHighlights,
761
761
  kbOpts: {
762
762
  kbExpr: EditorContextKeys.editorTextFocus,
@@ -770,7 +770,7 @@ class TriggerWordHighlightAction extends EditorAction {
770
770
  constructor() {
771
771
  super({
772
772
  id: 'editor.action.wordHighlight.trigger',
773
- label: nls.localize2(1581, "Trigger Symbol Highlight"),
773
+ label: nls.localize2(1590, "Trigger Symbol Highlight"),
774
774
  precondition: undefined,
775
775
  kbOpts: {
776
776
  kbExpr: EditorContextKeys.editorTextFocus,
@@ -395,18 +395,35 @@ export class DeleteInsideWord extends EditorAction {
395
395
  super({
396
396
  id: 'deleteInsideWord',
397
397
  precondition: EditorContextKeys.writable,
398
- label: nls.localize2(1582, "Delete Word"),
398
+ label: nls.localize2(1592, "Delete Word"),
399
+ metadata: {
400
+ description: nls.localize2(1593, "Delete the word at the cursor"),
401
+ args: [{
402
+ name: 'args',
403
+ schema: {
404
+ type: 'object',
405
+ properties: {
406
+ 'onlyWord': {
407
+ type: 'boolean',
408
+ default: false,
409
+ description: nls.localize(1591, "Delete only the word and leave surrounding whitespace")
410
+ }
411
+ }
412
+ }
413
+ }]
414
+ }
399
415
  });
400
416
  }
401
417
  run(accessor, editor, args) {
402
418
  if (!editor.hasModel()) {
403
419
  return;
404
420
  }
421
+ const onlyWord = !!(args && typeof args === 'object' && args.onlyWord);
405
422
  const wordSeparators = getMapForWordSeparators(editor.getOption(148 /* EditorOption.wordSeparators */), editor.getOption(147 /* EditorOption.wordSegmenterLocales */));
406
423
  const model = editor.getModel();
407
424
  const selections = editor.getSelections();
408
425
  const commands = selections.map((sel) => {
409
- const deleteRange = WordOperations.deleteInsideWord(wordSeparators, model, sel);
426
+ const deleteRange = WordOperations.deleteInsideWord(wordSeparators, model, sel, onlyWord);
410
427
  return new ReplaceCommand(deleteRange, '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AAE,CAAC,CAAC;AAC5C,qBAAqB,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAC;AAClD,qBAAqB,CAAC,IAAI,kBAAkB,EAAE,CAAC,CAAC;AAChD,qBAAqB,CAAC,IAAI,eAAe,EAAE,CAAC,CAAC;AAC7C,oBAAoB,CAAC,gBAAgB,CAAC,CAAC","file":"wordOperations.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 { KeyCode, KeyMod } from '../../../../base/common/keyCodes.js';\nimport * as nls from '../../../../nls.js';\nimport { CONTEXT_ACCESSIBILITY_MODE_ENABLED } from '../../../../platform/accessibility/common/accessibility.js';\nimport { ContextKeyExpr } from '../../../../platform/contextkey/common/contextkey.js';\nimport { IsWindowsContext } from '../../../../platform/contextkey/common/contextkeys.js';\nimport { KeybindingWeight } from '../../../../platform/keybinding/common/keybindingsRegistry.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { EditorAction, EditorCommand, ICommandOptions, registerEditorAction, registerEditorCommand, ServicesAccessor } from '../../../browser/editorExtensions.js';\nimport { ReplaceCommand } from '../../../common/commands/replaceCommand.js';\nimport { EditorOption, EditorOptions } from '../../../common/config/editorOptions.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { Selection } from '../../../common/core/selection.js';\nimport { getMapForWordSeparators, WordCharacterClassifier } from '../../../common/core/wordCharacterClassifier.js';\nimport { DeleteWordContext, WordNavigationType, WordOperations } from '../../../common/cursor/cursorWordOperations.js';\nimport { CursorState } from '../../../common/cursorCommon.js';\nimport { CursorChangeReason } from '../../../common/cursorEvents.js';\nimport { ScrollType } from '../../../common/editorCommon.js';\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\nimport { ILanguageConfigurationService } from '../../../common/languages/languageConfigurationRegistry.js';\nimport { ITextModel } from '../../../common/model.js';\n\nexport interface MoveWordOptions extends ICommandOptions {\n\tinSelectionMode: boolean;\n\twordNavigationType: WordNavigationType;\n}\n\nexport abstract class MoveWordCommand extends EditorCommand {\n\n\tprivate readonly _inSelectionMode: boolean;\n\tprivate readonly _wordNavigationType: WordNavigationType;\n\n\tconstructor(opts: MoveWordOptions) {\n\t\tsuper(opts);\n\t\tthis._inSelectionMode = opts.inSelectionMode;\n\t\tthis._wordNavigationType = opts.wordNavigationType;\n\t}\n\n\tpublic runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, args: unknown): void {\n\t\tif (!editor.hasModel()) {\n\t\t\treturn;\n\t\t}\n\t\tconst wordSeparators = getMapForWordSeparators(editor.getOption(EditorOption.wordSeparators), editor.getOption(EditorOption.wordSegmenterLocales));\n\t\tconst model = editor.getModel();\n\t\tconst selections = editor.getSelections();\n\t\tconst hasMulticursor = selections.length > 1;\n\t\tconst result = selections.map((sel) => {\n\t\t\tconst inPosition = new Position(sel.positionLineNumber, sel.positionColumn);\n\t\t\tconst outPosition = this._move(wordSeparators, model, inPosition, this._wordNavigationType, hasMulticursor);\n\t\t\treturn this._moveTo(sel, outPosition, this._inSelectionMode);\n\t\t});\n\n\t\tmodel.pushStackElement();\n\t\teditor._getViewModel().setCursorStates('moveWordCommand', CursorChangeReason.Explicit, result.map(r => CursorState.fromModelSelection(r)));\n\t\tif (result.length === 1) {\n\t\t\tconst pos = new Position(result[0].positionLineNumber, result[0].positionColumn);\n\t\t\teditor.revealPosition(pos, ScrollType.Smooth);\n\t\t}\n\t}\n\n\tprivate _moveTo(from: Selection, to: Position, inSelectionMode: boolean): Selection {\n\t\tif (inSelectionMode) {\n\t\t\t// move just position\n\t\t\treturn new Selection(\n\t\t\t\tfrom.selectionStartLineNumber,\n\t\t\t\tfrom.selectionStartColumn,\n\t\t\t\tto.lineNumber,\n\t\t\t\tto.column\n\t\t\t);\n\t\t} else {\n\t\t\t// move everything\n\t\t\treturn new Selection(\n\t\t\t\tto.lineNumber,\n\t\t\t\tto.column,\n\t\t\t\tto.lineNumber,\n\t\t\t\tto.column\n\t\t\t);\n\t\t}\n\t}\n\n\tprotected abstract _move(wordSeparators: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType, hasMulticursor: boolean): Position;\n}\n\nexport class WordLeftCommand extends MoveWordCommand {\n\tprotected _move(wordSeparators: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType, hasMulticursor: boolean): Position {\n\t\treturn WordOperations.moveWordLeft(wordSeparators, model, position, wordNavigationType, hasMulticursor);\n\t}\n}\n\nexport class WordRightCommand extends MoveWordCommand {\n\tprotected _move(wordSeparators: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType, hasMulticursor: boolean): Position {\n\t\treturn WordOperations.moveWordRight(wordSeparators, model, position, wordNavigationType);\n\t}\n}\n\nexport class CursorWordStartLeft extends WordLeftCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: false,\n\t\t\twordNavigationType: WordNavigationType.WordStart,\n\t\t\tid: 'cursorWordStartLeft',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n}\n\nexport class CursorWordEndLeft extends WordLeftCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: false,\n\t\t\twordNavigationType: WordNavigationType.WordEnd,\n\t\t\tid: 'cursorWordEndLeft',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n}\n\nexport class CursorWordLeft extends WordLeftCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: false,\n\t\t\twordNavigationType: WordNavigationType.WordStartFast,\n\t\t\tid: 'cursorWordLeft',\n\t\t\tprecondition: undefined,\n\t\t\tkbOpts: {\n\t\t\t\tkbExpr: ContextKeyExpr.and(EditorContextKeys.textInputFocus, ContextKeyExpr.and(CONTEXT_ACCESSIBILITY_MODE_ENABLED, IsWindowsContext)?.negate()),\n\t\t\t\tprimary: KeyMod.CtrlCmd | KeyCode.LeftArrow,\n\t\t\t\tmac: { primary: KeyMod.Alt | KeyCode.LeftArrow },\n\t\t\t\tweight: KeybindingWeight.EditorContrib\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport class CursorWordStartLeftSelect extends WordLeftCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: true,\n\t\t\twordNavigationType: WordNavigationType.WordStart,\n\t\t\tid: 'cursorWordStartLeftSelect',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n}\n\nexport class CursorWordEndLeftSelect extends WordLeftCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: true,\n\t\t\twordNavigationType: WordNavigationType.WordEnd,\n\t\t\tid: 'cursorWordEndLeftSelect',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n}\n\nexport class CursorWordLeftSelect extends WordLeftCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: true,\n\t\t\twordNavigationType: WordNavigationType.WordStartFast,\n\t\t\tid: 'cursorWordLeftSelect',\n\t\t\tprecondition: undefined,\n\t\t\tkbOpts: {\n\t\t\t\tkbExpr: ContextKeyExpr.and(EditorContextKeys.textInputFocus, ContextKeyExpr.and(CONTEXT_ACCESSIBILITY_MODE_ENABLED, IsWindowsContext)?.negate()),\n\t\t\t\tprimary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.LeftArrow,\n\t\t\t\tmac: { primary: KeyMod.Alt | KeyMod.Shift | KeyCode.LeftArrow },\n\t\t\t\tweight: KeybindingWeight.EditorContrib\n\t\t\t}\n\t\t});\n\t}\n}\n\n// Accessibility navigation commands should only be enabled on windows since they are tuned to what NVDA expects\nexport class CursorWordAccessibilityLeft extends WordLeftCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: false,\n\t\t\twordNavigationType: WordNavigationType.WordAccessibility,\n\t\t\tid: 'cursorWordAccessibilityLeft',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n\n\tprotected override _move(wordCharacterClassifier: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType, hasMulticursor: boolean): Position {\n\t\treturn super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue, wordCharacterClassifier.intlSegmenterLocales), model, position, wordNavigationType, hasMulticursor);\n\t}\n}\n\nexport class CursorWordAccessibilityLeftSelect extends WordLeftCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: true,\n\t\t\twordNavigationType: WordNavigationType.WordAccessibility,\n\t\t\tid: 'cursorWordAccessibilityLeftSelect',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n\n\tprotected override _move(wordCharacterClassifier: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType, hasMulticursor: boolean): Position {\n\t\treturn super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue, wordCharacterClassifier.intlSegmenterLocales), model, position, wordNavigationType, hasMulticursor);\n\t}\n}\n\nexport class CursorWordStartRight extends WordRightCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: false,\n\t\t\twordNavigationType: WordNavigationType.WordStart,\n\t\t\tid: 'cursorWordStartRight',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n}\n\nexport class CursorWordEndRight extends WordRightCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: false,\n\t\t\twordNavigationType: WordNavigationType.WordEnd,\n\t\t\tid: 'cursorWordEndRight',\n\t\t\tprecondition: undefined,\n\t\t\tkbOpts: {\n\t\t\t\tkbExpr: ContextKeyExpr.and(EditorContextKeys.textInputFocus, ContextKeyExpr.and(CONTEXT_ACCESSIBILITY_MODE_ENABLED, IsWindowsContext)?.negate()),\n\t\t\t\tprimary: KeyMod.CtrlCmd | KeyCode.RightArrow,\n\t\t\t\tmac: { primary: KeyMod.Alt | KeyCode.RightArrow },\n\t\t\t\tweight: KeybindingWeight.EditorContrib\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport class CursorWordRight extends WordRightCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: false,\n\t\t\twordNavigationType: WordNavigationType.WordEnd,\n\t\t\tid: 'cursorWordRight',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n}\n\nexport class CursorWordStartRightSelect extends WordRightCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: true,\n\t\t\twordNavigationType: WordNavigationType.WordStart,\n\t\t\tid: 'cursorWordStartRightSelect',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n}\n\nexport class CursorWordEndRightSelect extends WordRightCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: true,\n\t\t\twordNavigationType: WordNavigationType.WordEnd,\n\t\t\tid: 'cursorWordEndRightSelect',\n\t\t\tprecondition: undefined,\n\t\t\tkbOpts: {\n\t\t\t\tkbExpr: ContextKeyExpr.and(EditorContextKeys.textInputFocus, ContextKeyExpr.and(CONTEXT_ACCESSIBILITY_MODE_ENABLED, IsWindowsContext)?.negate()),\n\t\t\t\tprimary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.RightArrow,\n\t\t\t\tmac: { primary: KeyMod.Alt | KeyMod.Shift | KeyCode.RightArrow },\n\t\t\t\tweight: KeybindingWeight.EditorContrib\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport class CursorWordRightSelect extends WordRightCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: true,\n\t\t\twordNavigationType: WordNavigationType.WordEnd,\n\t\t\tid: 'cursorWordRightSelect',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n}\n\nexport class CursorWordAccessibilityRight extends WordRightCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: false,\n\t\t\twordNavigationType: WordNavigationType.WordAccessibility,\n\t\t\tid: 'cursorWordAccessibilityRight',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n\n\tprotected override _move(wordCharacterClassifier: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType, hasMulticursor: boolean): Position {\n\t\treturn super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue, wordCharacterClassifier.intlSegmenterLocales), model, position, wordNavigationType, hasMulticursor);\n\t}\n}\n\nexport class CursorWordAccessibilityRightSelect extends WordRightCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: true,\n\t\t\twordNavigationType: WordNavigationType.WordAccessibility,\n\t\t\tid: 'cursorWordAccessibilityRightSelect',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n\n\tprotected override _move(wordCharacterClassifier: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType, hasMulticursor: boolean): Position {\n\t\treturn super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue, wordCharacterClassifier.intlSegmenterLocales), model, position, wordNavigationType, hasMulticursor);\n\t}\n}\n\nexport interface DeleteWordOptions extends ICommandOptions {\n\twhitespaceHeuristics: boolean;\n\twordNavigationType: WordNavigationType;\n}\n\nexport abstract class DeleteWordCommand extends EditorCommand {\n\tprivate readonly _whitespaceHeuristics: boolean;\n\tprivate readonly _wordNavigationType: WordNavigationType;\n\n\tconstructor(opts: DeleteWordOptions) {\n\t\tsuper({ canTriggerInlineEdits: true, ...opts });\n\t\tthis._whitespaceHeuristics = opts.whitespaceHeuristics;\n\t\tthis._wordNavigationType = opts.wordNavigationType;\n\t}\n\n\tpublic runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, args: unknown): void {\n\t\tconst languageConfigurationService = accessor?.get(ILanguageConfigurationService);\n\n\t\tif (!editor.hasModel() || !languageConfigurationService) {\n\t\t\treturn;\n\t\t}\n\t\tconst wordSeparators = getMapForWordSeparators(editor.getOption(EditorOption.wordSeparators), editor.getOption(EditorOption.wordSegmenterLocales));\n\t\tconst model = editor.getModel();\n\t\tconst selections = editor.getSelections();\n\t\tconst autoClosingBrackets = editor.getOption(EditorOption.autoClosingBrackets);\n\t\tconst autoClosingQuotes = editor.getOption(EditorOption.autoClosingQuotes);\n\t\tconst autoClosingPairs = languageConfigurationService.getLanguageConfiguration(model.getLanguageId()).getAutoClosingPairs();\n\t\tconst viewModel = editor._getViewModel();\n\n\t\tconst commands = selections.map((sel) => {\n\t\t\tconst deleteRange = this._delete({\n\t\t\t\twordSeparators,\n\t\t\t\tmodel,\n\t\t\t\tselection: sel,\n\t\t\t\twhitespaceHeuristics: this._whitespaceHeuristics,\n\t\t\t\tautoClosingDelete: editor.getOption(EditorOption.autoClosingDelete),\n\t\t\t\tautoClosingBrackets,\n\t\t\t\tautoClosingQuotes,\n\t\t\t\tautoClosingPairs,\n\t\t\t\tautoClosedCharacters: viewModel.getCursorAutoClosedCharacters(),\n\t\t\t}, this._wordNavigationType);\n\t\t\treturn new ReplaceCommand(deleteRange, '');\n\t\t});\n\n\t\teditor.pushUndoStop();\n\t\teditor.executeCommands(this.id, commands);\n\t\teditor.pushUndoStop();\n\t}\n\n\tprotected abstract _delete(ctx: DeleteWordContext, wordNavigationType: WordNavigationType): Range;\n}\n\nexport class DeleteWordLeftCommand extends DeleteWordCommand {\n\tprotected _delete(ctx: DeleteWordContext, wordNavigationType: WordNavigationType): Range {\n\t\tconst r = WordOperations.deleteWordLeft(ctx, wordNavigationType);\n\t\tif (r) {\n\t\t\treturn r;\n\t\t}\n\t\treturn new Range(1, 1, 1, 1);\n\t}\n}\n\nexport class DeleteWordRightCommand extends DeleteWordCommand {\n\tprotected _delete(ctx: DeleteWordContext, wordNavigationType: WordNavigationType): Range {\n\t\tconst r = WordOperations.deleteWordRight(ctx, wordNavigationType);\n\t\tif (r) {\n\t\t\treturn r;\n\t\t}\n\t\tconst lineCount = ctx.model.getLineCount();\n\t\tconst maxColumn = ctx.model.getLineMaxColumn(lineCount);\n\t\treturn new Range(lineCount, maxColumn, lineCount, maxColumn);\n\t}\n}\n\nexport class DeleteWordStartLeft extends DeleteWordLeftCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\twhitespaceHeuristics: false,\n\t\t\twordNavigationType: WordNavigationType.WordStart,\n\t\t\tid: 'deleteWordStartLeft',\n\t\t\tprecondition: EditorContextKeys.writable\n\t\t});\n\t}\n}\n\nexport class DeleteWordEndLeft extends DeleteWordLeftCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\twhitespaceHeuristics: false,\n\t\t\twordNavigationType: WordNavigationType.WordEnd,\n\t\t\tid: 'deleteWordEndLeft',\n\t\t\tprecondition: EditorContextKeys.writable\n\t\t});\n\t}\n}\n\nexport class DeleteWordLeft extends DeleteWordLeftCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\twhitespaceHeuristics: true,\n\t\t\twordNavigationType: WordNavigationType.WordStart,\n\t\t\tid: 'deleteWordLeft',\n\t\t\tprecondition: EditorContextKeys.writable,\n\t\t\tkbOpts: {\n\t\t\t\tkbExpr: EditorContextKeys.textInputFocus,\n\t\t\t\tprimary: KeyMod.CtrlCmd | KeyCode.Backspace,\n\t\t\t\tmac: { primary: KeyMod.Alt | KeyCode.Backspace },\n\t\t\t\tweight: KeybindingWeight.EditorContrib\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport class DeleteWordStartRight extends DeleteWordRightCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\twhitespaceHeuristics: false,\n\t\t\twordNavigationType: WordNavigationType.WordStart,\n\t\t\tid: 'deleteWordStartRight',\n\t\t\tprecondition: EditorContextKeys.writable\n\t\t});\n\t}\n}\n\nexport class DeleteWordEndRight extends DeleteWordRightCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\twhitespaceHeuristics: false,\n\t\t\twordNavigationType: WordNavigationType.WordEnd,\n\t\t\tid: 'deleteWordEndRight',\n\t\t\tprecondition: EditorContextKeys.writable\n\t\t});\n\t}\n}\n\nexport class DeleteWordRight extends DeleteWordRightCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\twhitespaceHeuristics: true,\n\t\t\twordNavigationType: WordNavigationType.WordEnd,\n\t\t\tid: 'deleteWordRight',\n\t\t\tprecondition: EditorContextKeys.writable,\n\t\t\tkbOpts: {\n\t\t\t\tkbExpr: EditorContextKeys.textInputFocus,\n\t\t\t\tprimary: KeyMod.CtrlCmd | KeyCode.Delete,\n\t\t\t\tmac: { primary: KeyMod.Alt | KeyCode.Delete },\n\t\t\t\tweight: KeybindingWeight.EditorContrib\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport class DeleteInsideWord extends EditorAction {\n\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: 'deleteInsideWord',\n\t\t\tprecondition: EditorContextKeys.writable,\n\t\t\tlabel: nls.localize2('deleteInsideWord', \"Delete Word\"),\n\t\t});\n\t}\n\n\tpublic run(accessor: ServicesAccessor, editor: ICodeEditor, args: unknown): void {\n\t\tif (!editor.hasModel()) {\n\t\t\treturn;\n\t\t}\n\t\tconst wordSeparators = getMapForWordSeparators(editor.getOption(EditorOption.wordSeparators), editor.getOption(EditorOption.wordSegmenterLocales));\n\t\tconst model = editor.getModel();\n\t\tconst selections = editor.getSelections();\n\n\t\tconst commands = selections.map((sel) => {\n\t\t\tconst deleteRange = WordOperations.deleteInsideWord(wordSeparators, model, sel);\n\t\t\treturn new ReplaceCommand(deleteRange, '');\n\t\t});\n\n\t\teditor.pushUndoStop();\n\t\teditor.executeCommands(this.id, commands);\n\t\teditor.pushUndoStop();\n\t}\n}\n\nregisterEditorCommand(new CursorWordStartLeft());\nregisterEditorCommand(new CursorWordEndLeft());\nregisterEditorCommand(new CursorWordLeft());\nregisterEditorCommand(new CursorWordStartLeftSelect());\nregisterEditorCommand(new CursorWordEndLeftSelect());\nregisterEditorCommand(new CursorWordLeftSelect());\nregisterEditorCommand(new CursorWordStartRight());\nregisterEditorCommand(new CursorWordEndRight());\nregisterEditorCommand(new CursorWordRight());\nregisterEditorCommand(new CursorWordStartRightSelect());\nregisterEditorCommand(new CursorWordEndRightSelect());\nregisterEditorCommand(new CursorWordRightSelect());\nregisterEditorCommand(new CursorWordAccessibilityLeft());\nregisterEditorCommand(new CursorWordAccessibilityLeftSelect());\nregisterEditorCommand(new CursorWordAccessibilityRight());\nregisterEditorCommand(new CursorWordAccessibilityRightSelect());\nregisterEditorCommand(new DeleteWordStartLeft());\nregisterEditorCommand(new DeleteWordEndLeft());\nregisterEditorCommand(new DeleteWordLeft());\nregisterEditorCommand(new DeleteWordStartRight());\nregisterEditorCommand(new DeleteWordEndRight());\nregisterEditorCommand(new DeleteWordRight());\nregisterEditorAction(DeleteInsideWord);\n"]}
1
+ {"version":3,"sources":["vs/editor/contrib/wordOperations/browser/wordOperations.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAGhG,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,kCAAkC,EAAE,MAAM,4DAA4D,CAAC;AAChH,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,uDAAuD,CAAC;AAGzF,OAAO,EAAE,YAAY,EAAE,aAAa,EAAmB,oBAAoB,EAAE,qBAAqB,EAAoB,MAAM,sCAAsC,CAAC;AACnK,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAgB,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAA2B,MAAM,iDAAiD,CAAC;AACnH,OAAO,EAAyC,cAAc,EAAE,MAAM,gDAAgD,CAAC;AACvH,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAG9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,6BAA6B,EA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,CAAC,IAAI,yBAAyB,EAAE,CAAC,CAAC;AACvD,qBAAqB,CAAC,IAAI,uBAAuB,EAAE,CAAC,CAAC;AACrD,qBAAqB,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAC;AAClD,qBAAqB,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAC;AAClD,qBAAqB,CAAC,IAAI,kBAAkB,EAAE,CAAC,CAAC;AAChD,qBAAqB,CAAC,IAAI,eAAe,EAAE,CAAC,CAAC;AAC7C,qBAAqB,CAAC,IAAI,0BAA0B,EAAE,CAAC,CAAC;AACxD,qBAAqB,CAAC,IAAI,wBAAwB,EAAE,CAAC,CAAC;AACtD,qBAAqB,CAAC,IAAI,qBAAqB,EAAE,CAAC,CAAC;AACnD,qBAAqB,CAAC,IAAI,2BAA2B,EAAE,CAAC,CAAC;AACzD,qBAAqB,CAAC,IAAI,iCAAiC,EAAE,CAAC,CAAC;AAC/D,qBAAqB,CAAC,IAAI,4BAA4B,EAAE,CAAC,CAAC;AAC1D,qBAAqB,CAAC,IAAI,kCAAkC,EAAE,CAAC,CAAC;AAChE,qBAAqB,CAAC,IAAI,mBAAmB,EAAE,CAAC,CAAC;AACjD,qBAAqB,CAAC,IAAI,iBAAiB,EAAE,CAAC,CAAC;AAC/C,qBAAqB,CAAC,IAAI,cAAc,EAAE,CAAC,CAAC;AAC5C,qBAAqB,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAC;AAClD,qBAAqB,CAAC,IAAI,kBAAkB,EAAE,CAAC,CAAC;AAChD,qBAAqB,CAAC,IAAI,eAAe,EAAE,CAAC,CAAC;AAC7C,oBAAoB,CAAC,gBAAgB,CAAC,CAAC","file":"wordOperations.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 { KeyCode, KeyMod } from '../../../../base/common/keyCodes.js';\nimport * as nls from '../../../../nls.js';\nimport { CONTEXT_ACCESSIBILITY_MODE_ENABLED } from '../../../../platform/accessibility/common/accessibility.js';\nimport { ContextKeyExpr } from '../../../../platform/contextkey/common/contextkey.js';\nimport { IsWindowsContext } from '../../../../platform/contextkey/common/contextkeys.js';\nimport { KeybindingWeight } from '../../../../platform/keybinding/common/keybindingsRegistry.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { EditorAction, EditorCommand, ICommandOptions, registerEditorAction, registerEditorCommand, ServicesAccessor } from '../../../browser/editorExtensions.js';\nimport { ReplaceCommand } from '../../../common/commands/replaceCommand.js';\nimport { EditorOption, EditorOptions } from '../../../common/config/editorOptions.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { Selection } from '../../../common/core/selection.js';\nimport { getMapForWordSeparators, WordCharacterClassifier } from '../../../common/core/wordCharacterClassifier.js';\nimport { DeleteWordContext, WordNavigationType, WordOperations } from '../../../common/cursor/cursorWordOperations.js';\nimport { CursorState } from '../../../common/cursorCommon.js';\nimport { CursorChangeReason } from '../../../common/cursorEvents.js';\nimport { ScrollType } from '../../../common/editorCommon.js';\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\nimport { ILanguageConfigurationService } from '../../../common/languages/languageConfigurationRegistry.js';\nimport { ITextModel } from '../../../common/model.js';\n\nexport interface MoveWordOptions extends ICommandOptions {\n\tinSelectionMode: boolean;\n\twordNavigationType: WordNavigationType;\n}\n\nexport abstract class MoveWordCommand extends EditorCommand {\n\n\tprivate readonly _inSelectionMode: boolean;\n\tprivate readonly _wordNavigationType: WordNavigationType;\n\n\tconstructor(opts: MoveWordOptions) {\n\t\tsuper(opts);\n\t\tthis._inSelectionMode = opts.inSelectionMode;\n\t\tthis._wordNavigationType = opts.wordNavigationType;\n\t}\n\n\tpublic runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, args: unknown): void {\n\t\tif (!editor.hasModel()) {\n\t\t\treturn;\n\t\t}\n\t\tconst wordSeparators = getMapForWordSeparators(editor.getOption(EditorOption.wordSeparators), editor.getOption(EditorOption.wordSegmenterLocales));\n\t\tconst model = editor.getModel();\n\t\tconst selections = editor.getSelections();\n\t\tconst hasMulticursor = selections.length > 1;\n\t\tconst result = selections.map((sel) => {\n\t\t\tconst inPosition = new Position(sel.positionLineNumber, sel.positionColumn);\n\t\t\tconst outPosition = this._move(wordSeparators, model, inPosition, this._wordNavigationType, hasMulticursor);\n\t\t\treturn this._moveTo(sel, outPosition, this._inSelectionMode);\n\t\t});\n\n\t\tmodel.pushStackElement();\n\t\teditor._getViewModel().setCursorStates('moveWordCommand', CursorChangeReason.Explicit, result.map(r => CursorState.fromModelSelection(r)));\n\t\tif (result.length === 1) {\n\t\t\tconst pos = new Position(result[0].positionLineNumber, result[0].positionColumn);\n\t\t\teditor.revealPosition(pos, ScrollType.Smooth);\n\t\t}\n\t}\n\n\tprivate _moveTo(from: Selection, to: Position, inSelectionMode: boolean): Selection {\n\t\tif (inSelectionMode) {\n\t\t\t// move just position\n\t\t\treturn new Selection(\n\t\t\t\tfrom.selectionStartLineNumber,\n\t\t\t\tfrom.selectionStartColumn,\n\t\t\t\tto.lineNumber,\n\t\t\t\tto.column\n\t\t\t);\n\t\t} else {\n\t\t\t// move everything\n\t\t\treturn new Selection(\n\t\t\t\tto.lineNumber,\n\t\t\t\tto.column,\n\t\t\t\tto.lineNumber,\n\t\t\t\tto.column\n\t\t\t);\n\t\t}\n\t}\n\n\tprotected abstract _move(wordSeparators: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType, hasMulticursor: boolean): Position;\n}\n\nexport class WordLeftCommand extends MoveWordCommand {\n\tprotected _move(wordSeparators: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType, hasMulticursor: boolean): Position {\n\t\treturn WordOperations.moveWordLeft(wordSeparators, model, position, wordNavigationType, hasMulticursor);\n\t}\n}\n\nexport class WordRightCommand extends MoveWordCommand {\n\tprotected _move(wordSeparators: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType, hasMulticursor: boolean): Position {\n\t\treturn WordOperations.moveWordRight(wordSeparators, model, position, wordNavigationType);\n\t}\n}\n\nexport class CursorWordStartLeft extends WordLeftCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: false,\n\t\t\twordNavigationType: WordNavigationType.WordStart,\n\t\t\tid: 'cursorWordStartLeft',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n}\n\nexport class CursorWordEndLeft extends WordLeftCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: false,\n\t\t\twordNavigationType: WordNavigationType.WordEnd,\n\t\t\tid: 'cursorWordEndLeft',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n}\n\nexport class CursorWordLeft extends WordLeftCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: false,\n\t\t\twordNavigationType: WordNavigationType.WordStartFast,\n\t\t\tid: 'cursorWordLeft',\n\t\t\tprecondition: undefined,\n\t\t\tkbOpts: {\n\t\t\t\tkbExpr: ContextKeyExpr.and(EditorContextKeys.textInputFocus, ContextKeyExpr.and(CONTEXT_ACCESSIBILITY_MODE_ENABLED, IsWindowsContext)?.negate()),\n\t\t\t\tprimary: KeyMod.CtrlCmd | KeyCode.LeftArrow,\n\t\t\t\tmac: { primary: KeyMod.Alt | KeyCode.LeftArrow },\n\t\t\t\tweight: KeybindingWeight.EditorContrib\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport class CursorWordStartLeftSelect extends WordLeftCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: true,\n\t\t\twordNavigationType: WordNavigationType.WordStart,\n\t\t\tid: 'cursorWordStartLeftSelect',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n}\n\nexport class CursorWordEndLeftSelect extends WordLeftCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: true,\n\t\t\twordNavigationType: WordNavigationType.WordEnd,\n\t\t\tid: 'cursorWordEndLeftSelect',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n}\n\nexport class CursorWordLeftSelect extends WordLeftCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: true,\n\t\t\twordNavigationType: WordNavigationType.WordStartFast,\n\t\t\tid: 'cursorWordLeftSelect',\n\t\t\tprecondition: undefined,\n\t\t\tkbOpts: {\n\t\t\t\tkbExpr: ContextKeyExpr.and(EditorContextKeys.textInputFocus, ContextKeyExpr.and(CONTEXT_ACCESSIBILITY_MODE_ENABLED, IsWindowsContext)?.negate()),\n\t\t\t\tprimary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.LeftArrow,\n\t\t\t\tmac: { primary: KeyMod.Alt | KeyMod.Shift | KeyCode.LeftArrow },\n\t\t\t\tweight: KeybindingWeight.EditorContrib\n\t\t\t}\n\t\t});\n\t}\n}\n\n// Accessibility navigation commands should only be enabled on windows since they are tuned to what NVDA expects\nexport class CursorWordAccessibilityLeft extends WordLeftCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: false,\n\t\t\twordNavigationType: WordNavigationType.WordAccessibility,\n\t\t\tid: 'cursorWordAccessibilityLeft',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n\n\tprotected override _move(wordCharacterClassifier: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType, hasMulticursor: boolean): Position {\n\t\treturn super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue, wordCharacterClassifier.intlSegmenterLocales), model, position, wordNavigationType, hasMulticursor);\n\t}\n}\n\nexport class CursorWordAccessibilityLeftSelect extends WordLeftCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: true,\n\t\t\twordNavigationType: WordNavigationType.WordAccessibility,\n\t\t\tid: 'cursorWordAccessibilityLeftSelect',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n\n\tprotected override _move(wordCharacterClassifier: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType, hasMulticursor: boolean): Position {\n\t\treturn super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue, wordCharacterClassifier.intlSegmenterLocales), model, position, wordNavigationType, hasMulticursor);\n\t}\n}\n\nexport class CursorWordStartRight extends WordRightCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: false,\n\t\t\twordNavigationType: WordNavigationType.WordStart,\n\t\t\tid: 'cursorWordStartRight',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n}\n\nexport class CursorWordEndRight extends WordRightCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: false,\n\t\t\twordNavigationType: WordNavigationType.WordEnd,\n\t\t\tid: 'cursorWordEndRight',\n\t\t\tprecondition: undefined,\n\t\t\tkbOpts: {\n\t\t\t\tkbExpr: ContextKeyExpr.and(EditorContextKeys.textInputFocus, ContextKeyExpr.and(CONTEXT_ACCESSIBILITY_MODE_ENABLED, IsWindowsContext)?.negate()),\n\t\t\t\tprimary: KeyMod.CtrlCmd | KeyCode.RightArrow,\n\t\t\t\tmac: { primary: KeyMod.Alt | KeyCode.RightArrow },\n\t\t\t\tweight: KeybindingWeight.EditorContrib\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport class CursorWordRight extends WordRightCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: false,\n\t\t\twordNavigationType: WordNavigationType.WordEnd,\n\t\t\tid: 'cursorWordRight',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n}\n\nexport class CursorWordStartRightSelect extends WordRightCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: true,\n\t\t\twordNavigationType: WordNavigationType.WordStart,\n\t\t\tid: 'cursorWordStartRightSelect',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n}\n\nexport class CursorWordEndRightSelect extends WordRightCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: true,\n\t\t\twordNavigationType: WordNavigationType.WordEnd,\n\t\t\tid: 'cursorWordEndRightSelect',\n\t\t\tprecondition: undefined,\n\t\t\tkbOpts: {\n\t\t\t\tkbExpr: ContextKeyExpr.and(EditorContextKeys.textInputFocus, ContextKeyExpr.and(CONTEXT_ACCESSIBILITY_MODE_ENABLED, IsWindowsContext)?.negate()),\n\t\t\t\tprimary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.RightArrow,\n\t\t\t\tmac: { primary: KeyMod.Alt | KeyMod.Shift | KeyCode.RightArrow },\n\t\t\t\tweight: KeybindingWeight.EditorContrib\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport class CursorWordRightSelect extends WordRightCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: true,\n\t\t\twordNavigationType: WordNavigationType.WordEnd,\n\t\t\tid: 'cursorWordRightSelect',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n}\n\nexport class CursorWordAccessibilityRight extends WordRightCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: false,\n\t\t\twordNavigationType: WordNavigationType.WordAccessibility,\n\t\t\tid: 'cursorWordAccessibilityRight',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n\n\tprotected override _move(wordCharacterClassifier: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType, hasMulticursor: boolean): Position {\n\t\treturn super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue, wordCharacterClassifier.intlSegmenterLocales), model, position, wordNavigationType, hasMulticursor);\n\t}\n}\n\nexport class CursorWordAccessibilityRightSelect extends WordRightCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\tinSelectionMode: true,\n\t\t\twordNavigationType: WordNavigationType.WordAccessibility,\n\t\t\tid: 'cursorWordAccessibilityRightSelect',\n\t\t\tprecondition: undefined\n\t\t});\n\t}\n\n\tprotected override _move(wordCharacterClassifier: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType, hasMulticursor: boolean): Position {\n\t\treturn super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue, wordCharacterClassifier.intlSegmenterLocales), model, position, wordNavigationType, hasMulticursor);\n\t}\n}\n\nexport interface DeleteWordOptions extends ICommandOptions {\n\twhitespaceHeuristics: boolean;\n\twordNavigationType: WordNavigationType;\n}\n\nexport abstract class DeleteWordCommand extends EditorCommand {\n\tprivate readonly _whitespaceHeuristics: boolean;\n\tprivate readonly _wordNavigationType: WordNavigationType;\n\n\tconstructor(opts: DeleteWordOptions) {\n\t\tsuper({ canTriggerInlineEdits: true, ...opts });\n\t\tthis._whitespaceHeuristics = opts.whitespaceHeuristics;\n\t\tthis._wordNavigationType = opts.wordNavigationType;\n\t}\n\n\tpublic runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, args: unknown): void {\n\t\tconst languageConfigurationService = accessor?.get(ILanguageConfigurationService);\n\n\t\tif (!editor.hasModel() || !languageConfigurationService) {\n\t\t\treturn;\n\t\t}\n\t\tconst wordSeparators = getMapForWordSeparators(editor.getOption(EditorOption.wordSeparators), editor.getOption(EditorOption.wordSegmenterLocales));\n\t\tconst model = editor.getModel();\n\t\tconst selections = editor.getSelections();\n\t\tconst autoClosingBrackets = editor.getOption(EditorOption.autoClosingBrackets);\n\t\tconst autoClosingQuotes = editor.getOption(EditorOption.autoClosingQuotes);\n\t\tconst autoClosingPairs = languageConfigurationService.getLanguageConfiguration(model.getLanguageId()).getAutoClosingPairs();\n\t\tconst viewModel = editor._getViewModel();\n\n\t\tconst commands = selections.map((sel) => {\n\t\t\tconst deleteRange = this._delete({\n\t\t\t\twordSeparators,\n\t\t\t\tmodel,\n\t\t\t\tselection: sel,\n\t\t\t\twhitespaceHeuristics: this._whitespaceHeuristics,\n\t\t\t\tautoClosingDelete: editor.getOption(EditorOption.autoClosingDelete),\n\t\t\t\tautoClosingBrackets,\n\t\t\t\tautoClosingQuotes,\n\t\t\t\tautoClosingPairs,\n\t\t\t\tautoClosedCharacters: viewModel.getCursorAutoClosedCharacters(),\n\t\t\t}, this._wordNavigationType);\n\t\t\treturn new ReplaceCommand(deleteRange, '');\n\t\t});\n\n\t\teditor.pushUndoStop();\n\t\teditor.executeCommands(this.id, commands);\n\t\teditor.pushUndoStop();\n\t}\n\n\tprotected abstract _delete(ctx: DeleteWordContext, wordNavigationType: WordNavigationType): Range;\n}\n\nexport class DeleteWordLeftCommand extends DeleteWordCommand {\n\tprotected _delete(ctx: DeleteWordContext, wordNavigationType: WordNavigationType): Range {\n\t\tconst r = WordOperations.deleteWordLeft(ctx, wordNavigationType);\n\t\tif (r) {\n\t\t\treturn r;\n\t\t}\n\t\treturn new Range(1, 1, 1, 1);\n\t}\n}\n\nexport class DeleteWordRightCommand extends DeleteWordCommand {\n\tprotected _delete(ctx: DeleteWordContext, wordNavigationType: WordNavigationType): Range {\n\t\tconst r = WordOperations.deleteWordRight(ctx, wordNavigationType);\n\t\tif (r) {\n\t\t\treturn r;\n\t\t}\n\t\tconst lineCount = ctx.model.getLineCount();\n\t\tconst maxColumn = ctx.model.getLineMaxColumn(lineCount);\n\t\treturn new Range(lineCount, maxColumn, lineCount, maxColumn);\n\t}\n}\n\nexport class DeleteWordStartLeft extends DeleteWordLeftCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\twhitespaceHeuristics: false,\n\t\t\twordNavigationType: WordNavigationType.WordStart,\n\t\t\tid: 'deleteWordStartLeft',\n\t\t\tprecondition: EditorContextKeys.writable\n\t\t});\n\t}\n}\n\nexport class DeleteWordEndLeft extends DeleteWordLeftCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\twhitespaceHeuristics: false,\n\t\t\twordNavigationType: WordNavigationType.WordEnd,\n\t\t\tid: 'deleteWordEndLeft',\n\t\t\tprecondition: EditorContextKeys.writable\n\t\t});\n\t}\n}\n\nexport class DeleteWordLeft extends DeleteWordLeftCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\twhitespaceHeuristics: true,\n\t\t\twordNavigationType: WordNavigationType.WordStart,\n\t\t\tid: 'deleteWordLeft',\n\t\t\tprecondition: EditorContextKeys.writable,\n\t\t\tkbOpts: {\n\t\t\t\tkbExpr: EditorContextKeys.textInputFocus,\n\t\t\t\tprimary: KeyMod.CtrlCmd | KeyCode.Backspace,\n\t\t\t\tmac: { primary: KeyMod.Alt | KeyCode.Backspace },\n\t\t\t\tweight: KeybindingWeight.EditorContrib\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport class DeleteWordStartRight extends DeleteWordRightCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\twhitespaceHeuristics: false,\n\t\t\twordNavigationType: WordNavigationType.WordStart,\n\t\t\tid: 'deleteWordStartRight',\n\t\t\tprecondition: EditorContextKeys.writable\n\t\t});\n\t}\n}\n\nexport class DeleteWordEndRight extends DeleteWordRightCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\twhitespaceHeuristics: false,\n\t\t\twordNavigationType: WordNavigationType.WordEnd,\n\t\t\tid: 'deleteWordEndRight',\n\t\t\tprecondition: EditorContextKeys.writable\n\t\t});\n\t}\n}\n\nexport class DeleteWordRight extends DeleteWordRightCommand {\n\tconstructor() {\n\t\tsuper({\n\t\t\twhitespaceHeuristics: true,\n\t\t\twordNavigationType: WordNavigationType.WordEnd,\n\t\t\tid: 'deleteWordRight',\n\t\t\tprecondition: EditorContextKeys.writable,\n\t\t\tkbOpts: {\n\t\t\t\tkbExpr: EditorContextKeys.textInputFocus,\n\t\t\t\tprimary: KeyMod.CtrlCmd | KeyCode.Delete,\n\t\t\t\tmac: { primary: KeyMod.Alt | KeyCode.Delete },\n\t\t\t\tweight: KeybindingWeight.EditorContrib\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport class DeleteInsideWord extends EditorAction {\n\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: 'deleteInsideWord',\n\t\t\tprecondition: EditorContextKeys.writable,\n\t\t\tlabel: nls.localize2('deleteInsideWord', \"Delete Word\"),\n\t\t\tmetadata: {\n\t\t\t\tdescription: nls.localize2('deleteInsideWord.description', \"Delete the word at the cursor\"),\n\t\t\t\targs: [{\n\t\t\t\t\tname: 'args',\n\t\t\t\t\tschema: {\n\t\t\t\t\t\ttype: 'object',\n\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\t'onlyWord': {\n\t\t\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\t\t\tdefault: false,\n\t\t\t\t\t\t\t\tdescription: nls.localize('deleteInsideWord.args.onlyWord', \"Delete only the word and leave surrounding whitespace\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}]\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic run(accessor: ServicesAccessor, editor: ICodeEditor, args: unknown): void {\n\t\tif (!editor.hasModel()) {\n\t\t\treturn;\n\t\t}\n\n\t\ttype DeleteInsideWordArgs = { readonly onlyWord?: boolean };\n\t\tconst onlyWord = !!(args && typeof args === 'object' && (args as DeleteInsideWordArgs).onlyWord);\n\t\tconst wordSeparators = getMapForWordSeparators(editor.getOption(EditorOption.wordSeparators), editor.getOption(EditorOption.wordSegmenterLocales));\n\t\tconst model = editor.getModel();\n\t\tconst selections = editor.getSelections();\n\n\t\tconst commands = selections.map((sel) => {\n\t\t\tconst deleteRange = WordOperations.deleteInsideWord(wordSeparators, model, sel, onlyWord);\n\t\t\treturn new ReplaceCommand(deleteRange, '');\n\t\t});\n\n\t\teditor.pushUndoStop();\n\t\teditor.executeCommands(this.id, commands);\n\t\teditor.pushUndoStop();\n\t}\n}\n\nregisterEditorCommand(new CursorWordStartLeft());\nregisterEditorCommand(new CursorWordEndLeft());\nregisterEditorCommand(new CursorWordLeft());\nregisterEditorCommand(new CursorWordStartLeftSelect());\nregisterEditorCommand(new CursorWordEndLeftSelect());\nregisterEditorCommand(new CursorWordLeftSelect());\nregisterEditorCommand(new CursorWordStartRight());\nregisterEditorCommand(new CursorWordEndRight());\nregisterEditorCommand(new CursorWordRight());\nregisterEditorCommand(new CursorWordStartRightSelect());\nregisterEditorCommand(new CursorWordEndRightSelect());\nregisterEditorCommand(new CursorWordRightSelect());\nregisterEditorCommand(new CursorWordAccessibilityLeft());\nregisterEditorCommand(new CursorWordAccessibilityLeftSelect());\nregisterEditorCommand(new CursorWordAccessibilityRight());\nregisterEditorCommand(new CursorWordAccessibilityRightSelect());\nregisterEditorCommand(new DeleteWordStartLeft());\nregisterEditorCommand(new DeleteWordEndLeft());\nregisterEditorCommand(new DeleteWordLeft());\nregisterEditorCommand(new DeleteWordStartRight());\nregisterEditorCommand(new DeleteWordEndRight());\nregisterEditorCommand(new DeleteWordRight());\nregisterEditorAction(DeleteInsideWord);\n"]}
@@ -5586,6 +5586,11 @@ export namespace editor {
5586
5586
  * Render this content widget in a location where it could overflow the editor's view dom node.
5587
5587
  */
5588
5588
  allowEditorOverflow?: boolean;
5589
+ /**
5590
+ * If true, this widget doesn't have a visual representation.
5591
+ * The element will have display set to 'none'.
5592
+ */
5593
+ useDisplayNone?: boolean;
5589
5594
  /**
5590
5595
  * Call preventDefault() on mousedown events that target the content widget.
5591
5596
  */
@@ -6374,6 +6379,7 @@ export namespace editor {
6374
6379
  * Use this method with caution.
6375
6380
  */
6376
6381
  getOffsetForColumn(lineNumber: number, column: number): number;
6382
+ getWidthOfLine(lineNumber: number): number;
6377
6383
  /**
6378
6384
  * Force an editor render now.
6379
6385
  */
@@ -7494,6 +7500,16 @@ export namespace languages {
7494
7500
  readonly earliestShownDateTime: number;
7495
7501
  }
7496
7502
 
7503
+ export interface IInlineCompletionModelInfo {
7504
+ models: IInlineCompletionModel[];
7505
+ currentModelId: string;
7506
+ }
7507
+
7508
+ export interface IInlineCompletionModel {
7509
+ name: string;
7510
+ id: string;
7511
+ }
7512
+
7497
7513
  export class SelectedSuggestionInfo {
7498
7514
  readonly range: IRange;
7499
7515
  readonly text: string;
@@ -7552,11 +7568,14 @@ export namespace languages {
7552
7568
  /** Only show the inline suggestion when the cursor is in the showRange. */
7553
7569
  readonly showRange?: IRange;
7554
7570
  readonly warning?: InlineCompletionWarning;
7555
- readonly hint?: InlineCompletionHint;
7571
+ readonly hint?: IInlineCompletionHint;
7572
+ readonly supportsRename?: boolean;
7556
7573
  /**
7557
7574
  * Used for telemetry.
7558
7575
  */
7559
7576
  readonly correlationId?: string | undefined;
7577
+ readonly jumpToPosition?: IPosition;
7578
+ readonly doNotLog?: boolean;
7560
7579
  }
7561
7580
 
7562
7581
  export interface InlineCompletionWarning {
@@ -7569,7 +7588,7 @@ export namespace languages {
7569
7588
  Label = 2
7570
7589
  }
7571
7590
 
7572
- export interface InlineCompletionHint {
7591
+ export interface IInlineCompletionHint {
7573
7592
  /** Refers to the current document. */
7574
7593
  range: IRange;
7575
7594
  style: InlineCompletionHintStyle;
@@ -7637,6 +7656,9 @@ export namespace languages {
7637
7656
  excludesGroupIds?: InlineCompletionProviderGroupId[];
7638
7657
  displayName?: string;
7639
7658
  debounceDelayMs?: number;
7659
+ modelInfo?: IInlineCompletionModelInfo;
7660
+ onDidModelInfoChange?: IEvent<void>;
7661
+ setModelId?(modelId: string): Promise<void>;
7640
7662
  toString?(): string;
7641
7663
  }
7642
7664
 
@@ -7652,6 +7674,7 @@ export namespace languages {
7652
7674
 
7653
7675
  export type InlineCompletionEndOfLifeReason<TInlineCompletion = InlineCompletion> = {
7654
7676
  kind: InlineCompletionEndOfLifeReasonKind.Accepted;
7677
+ alternativeAction: boolean;
7655
7678
  } | {
7656
7679
  kind: InlineCompletionEndOfLifeReasonKind.Rejected;
7657
7680
  } | {
@@ -7671,6 +7694,7 @@ export namespace languages {
7671
7694
  shownDuration: number;
7672
7695
  shownDurationUncollapsed: number;
7673
7696
  timeUntilShown: number | undefined;
7697
+ timeUntilActuallyShown: number | undefined;
7674
7698
  timeUntilProviderRequest: number;
7675
7699
  timeUntilProviderResponse: number;
7676
7700
  notShownReason: string | undefined;
@@ -7679,6 +7703,7 @@ export namespace languages {
7679
7703
  preceeded: boolean;
7680
7704
  languageId: string;
7681
7705
  requestReason: string;
7706
+ performanceMarkers?: string;
7682
7707
  cursorColumnDistance?: number;
7683
7708
  cursorLineDistance?: number;
7684
7709
  lineCountOriginal?: number;
@@ -7691,6 +7716,16 @@ export namespace languages {
7691
7716
  typingIntervalCharacterCount: number;
7692
7717
  selectedSuggestionInfo: boolean;
7693
7718
  availableProviders: string;
7719
+ skuPlan: string | undefined;
7720
+ skuType: string | undefined;
7721
+ renameCreated: boolean | undefined;
7722
+ renameDuration: number | undefined;
7723
+ renameTimedOut: boolean | undefined;
7724
+ renameDroppedOtherEdits: number | undefined;
7725
+ renameDroppedRenameEdits: number | undefined;
7726
+ editKind: string | undefined;
7727
+ longDistanceHintVisible?: boolean;
7728
+ longDistanceHintDistance?: number;
7694
7729
  };
7695
7730
 
7696
7731
  export interface CodeAction {
@@ -107,7 +107,7 @@ export class EncodedTokenizationSupportAdapter {
107
107
  }
108
108
  tokenizeEncoded(line, hasEOL, state) {
109
109
  const result = this._actual.tokenizeEncoded(line, state);
110
- return new languages.EncodedTokenizationResult(result.tokens, result.endState);
110
+ return new languages.EncodedTokenizationResult(result.tokens, [], result.endState);
111
111
  }
112
112
  }
113
113
  /**
@@ -206,7 +206,7 @@ export class TokenizationSupportAdapter {
206
206
  else {
207
207
  endState = actualResult.endState;
208
208
  }
209
- return new languages.EncodedTokenizationResult(tokens, endState);
209
+ return new languages.EncodedTokenizationResult(tokens, [], endState);
210
210
  }
211
211
  }
212
212
  function isATokensProvider(provider) {