monaco-editor-core 0.54.0-dev-20250910 → 0.54.0-dev-20250912

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 (278) hide show
  1. package/esm/nls.keys.json +1 -1
  2. package/esm/nls.messages.de.js +2 -2
  3. package/esm/nls.messages.es.js +2 -2
  4. package/esm/nls.messages.fr.js +2 -2
  5. package/esm/nls.messages.it.js +2 -2
  6. package/esm/nls.messages.ja.js +2 -2
  7. package/esm/nls.messages.js +1 -1
  8. package/esm/nls.messages.json +1 -1
  9. package/esm/nls.messages.ko.js +2 -2
  10. package/esm/nls.messages.ru.js +2 -2
  11. package/esm/nls.messages.zh-cn.js +2 -2
  12. package/esm/nls.messages.zh-tw.js +2 -2
  13. package/esm/nls.metadata.json +8 -2
  14. package/esm/vs/base/browser/domSanitize.js +32 -21
  15. package/esm/vs/base/browser/domSanitize.js.map +1 -1
  16. package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  17. package/esm/vs/base/browser/ui/menu/menu.js +2 -0
  18. package/esm/vs/base/browser/ui/menu/menu.js.map +1 -1
  19. package/esm/vs/base/common/codiconsLibrary.js +2 -0
  20. package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
  21. package/esm/vs/base/common/observableInternal/index.js +3 -0
  22. package/esm/vs/base/common/observableInternal/index.js.map +1 -1
  23. package/esm/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js +71 -0
  24. package/esm/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js.map +1 -0
  25. package/esm/vs/base/common/observableInternal/observables/baseObservable.js +4 -0
  26. package/esm/vs/base/common/observableInternal/observables/baseObservable.js.map +1 -1
  27. package/esm/vs/base/common/observableInternal/observables/derivedImpl.js +10 -0
  28. package/esm/vs/base/common/observableInternal/observables/derivedImpl.js.map +1 -1
  29. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js +3 -0
  30. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
  31. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js +9 -0
  32. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
  33. package/esm/vs/editor/browser/config/editorConfiguration.js +1 -1
  34. package/esm/vs/editor/browser/controller/dragScrolling.js +4 -4
  35. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +3 -3
  36. package/esm/vs/editor/browser/controller/editContext/native/screenReaderContentRich.js +3 -3
  37. package/esm/vs/editor/browser/controller/editContext/native/screenReaderSupport.js +6 -6
  38. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +9 -9
  39. package/esm/vs/editor/browser/controller/mouseHandler.js +6 -6
  40. package/esm/vs/editor/browser/controller/mouseTarget.js +3 -3
  41. package/esm/vs/editor/browser/coreCommands.js +2 -2
  42. package/esm/vs/editor/browser/gpu/rectangleRenderer.js +1 -1
  43. package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -1
  44. package/esm/vs/editor/browser/observableCodeEditor.js +1 -1
  45. package/esm/vs/editor/browser/view/viewController.js +2 -2
  46. package/esm/vs/editor/browser/view/viewLayer.js +1 -1
  47. package/esm/vs/editor/browser/view/viewOverlays.js +4 -4
  48. package/esm/vs/editor/browser/view.js +5 -5
  49. package/esm/vs/editor/browser/viewParts/blockDecorations/blockDecorations.js +1 -1
  50. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +3 -3
  51. package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +6 -6
  52. package/esm/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js +8 -8
  53. package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +2 -2
  54. package/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.js +2 -2
  55. package/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js +2 -2
  56. package/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js +2 -2
  57. package/esm/vs/editor/browser/viewParts/margin/margin.js +2 -2
  58. package/esm/vs/editor/browser/viewParts/minimap/minimap.js +5 -5
  59. package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +2 -2
  60. package/esm/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js +4 -4
  61. package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +3 -3
  62. package/esm/vs/editor/browser/viewParts/rulers/rulers.js +2 -2
  63. package/esm/vs/editor/browser/viewParts/rulersGpu/rulersGpu.js +1 -1
  64. package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +3 -3
  65. package/esm/vs/editor/browser/viewParts/selections/selections.js +2 -2
  66. package/esm/vs/editor/browser/viewParts/viewCursors/viewCursor.js +2 -2
  67. package/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.js +6 -6
  68. package/esm/vs/editor/browser/viewParts/viewLines/viewLineOptions.js +4 -4
  69. package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js +11 -11
  70. package/esm/vs/editor/browser/viewParts/viewLinesGpu/viewLinesGpu.js +1 -1
  71. package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js +2 -2
  72. package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js +4 -4
  73. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +12 -12
  74. package/esm/vs/editor/browser/widget/diffEditor/commands.js +12 -1
  75. package/esm/vs/editor/browser/widget/diffEditor/commands.js.map +1 -1
  76. package/esm/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js +4 -4
  77. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +3 -3
  78. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js +2 -2
  79. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js +2 -2
  80. package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +25 -0
  81. package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js.map +1 -1
  82. package/esm/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +1 -1
  83. package/esm/vs/editor/browser/widget/diffEditor/features/overviewRulerFeature.js +1 -1
  84. package/esm/vs/editor/common/config/editorOptions.js +155 -154
  85. package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
  86. package/esm/vs/editor/common/core/editorColorRegistry.js +68 -68
  87. package/esm/vs/editor/common/core/ranges/lineRange.js +3 -0
  88. package/esm/vs/editor/common/core/ranges/lineRange.js.map +1 -1
  89. package/esm/vs/editor/common/cursorCommon.js +19 -19
  90. package/esm/vs/editor/common/editorContextKeys.js +46 -46
  91. package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
  92. package/esm/vs/editor/common/languages.js +56 -56
  93. package/esm/vs/editor/common/model/editStack.js +1 -1
  94. package/esm/vs/editor/common/standalone/standaloneEnums.js +86 -85
  95. package/esm/vs/editor/common/standalone/standaloneEnums.js.map +1 -1
  96. package/esm/vs/editor/common/standaloneStrings.js +10 -10
  97. package/esm/vs/editor/common/viewLayout/viewLayout.js +15 -15
  98. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
  99. package/esm/vs/editor/common/viewModel/monospaceLineBreaksComputer.js +1 -1
  100. package/esm/vs/editor/common/viewModel/viewModelImpl.js +14 -14
  101. package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
  102. package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
  103. package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
  104. package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
  105. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +20 -20
  106. package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
  107. package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
  108. package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
  109. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
  110. package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
  111. package/esm/vs/editor/contrib/codeAction/browser/codeActionModel.js +1 -1
  112. package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
  113. package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
  114. package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js +3 -3
  115. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
  116. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
  117. package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerContribution.js +1 -1
  118. package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +2 -2
  119. package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
  120. package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerParticipant.js +1 -1
  121. package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
  122. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +12 -12
  123. package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
  124. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
  125. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +12 -12
  126. package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
  127. package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
  128. package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
  129. package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
  130. package/esm/vs/editor/contrib/find/browser/findController.js +17 -17
  131. package/esm/vs/editor/contrib/find/browser/findModel.js +6 -6
  132. package/esm/vs/editor/contrib/find/browser/findWidget.js +32 -32
  133. package/esm/vs/editor/contrib/folding/browser/folding.js +23 -23
  134. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
  135. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js.map +1 -1
  136. package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
  137. package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
  138. package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
  139. package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
  140. package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
  141. package/esm/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js +21 -11
  142. package/esm/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js.map +1 -1
  143. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +2 -2
  144. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +4 -4
  145. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
  146. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
  147. package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
  148. package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
  149. package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
  150. package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
  151. package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
  152. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +10 -10
  153. package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +6 -6
  154. package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
  155. package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
  156. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +5 -5
  157. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
  158. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsLocations.js +2 -2
  159. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +19 -19
  160. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +12 -12
  161. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +2 -2
  162. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +1 -1
  163. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
  164. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +1 -1
  165. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +5 -5
  166. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +5 -5
  167. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +4 -1
  168. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
  169. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +1 -1
  170. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +2 -0
  171. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
  172. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +1 -0
  173. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
  174. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +22 -21
  175. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js.map +1 -1
  176. package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
  177. package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  178. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +32 -32
  179. package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +4 -4
  180. package/esm/vs/editor/contrib/links/browser/links.js +11 -11
  181. package/esm/vs/editor/contrib/links/browser/links.js.map +1 -1
  182. package/esm/vs/editor/contrib/longLinesHelper/browser/longLinesHelper.js +1 -1
  183. package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
  184. package/esm/vs/editor/contrib/middleScroll/browser/middleScrollController.js +1 -1
  185. package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +36 -36
  186. package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
  187. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsModel.js +3 -3
  188. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
  189. package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
  190. package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
  191. package/esm/vs/editor/contrib/placeholderText/browser/placeholderTextContribution.js +1 -1
  192. package/esm/vs/editor/contrib/placeholderText/browser/placeholderTextContribution.js.map +1 -1
  193. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +5 -5
  194. package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
  195. package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +3 -3
  196. package/esm/vs/editor/contrib/rename/browser/rename.js +11 -11
  197. package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
  198. package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +5 -5
  199. package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
  200. package/esm/vs/editor/contrib/snippet/browser/snippetSession.js +2 -2
  201. package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  202. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  203. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +17 -24
  204. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js.map +1 -1
  205. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider.js +1 -1
  206. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js +12 -3
  207. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js.map +1 -1
  208. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +5 -5
  209. package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
  210. package/esm/vs/editor/contrib/suggest/browser/suggestController.js +14 -14
  211. package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +2 -2
  212. package/esm/vs/editor/contrib/suggest/browser/suggestModel.js +11 -11
  213. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +23 -23
  214. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +5 -5
  215. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +5 -5
  216. package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +3 -3
  217. package/esm/vs/editor/contrib/suggest/browser/wordDistance.js +1 -1
  218. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  219. package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  220. package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  221. package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
  222. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +27 -27
  223. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +9 -9
  224. package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  225. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +7 -7
  226. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +4 -4
  227. package/esm/vs/editor/editor.api.d.ts +93 -85
  228. package/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js +1 -1
  229. package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
  230. package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
  231. package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
  232. package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
  233. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
  234. package/esm/vs/platform/actions/browser/toolbar.js +2 -2
  235. package/esm/vs/platform/actions/common/menuService.js +2 -2
  236. package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
  237. package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
  238. package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
  239. package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
  240. package/esm/vs/platform/contextkey/common/scanner.js +5 -5
  241. package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  242. package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
  243. package/esm/vs/platform/list/browser/listService.js +27 -27
  244. package/esm/vs/platform/markers/common/markerService.js +2 -2
  245. package/esm/vs/platform/markers/common/markers.js +6 -6
  246. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +7 -7
  247. package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
  248. package/esm/vs/platform/quickinput/browser/quickInput.js +21 -13
  249. package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
  250. package/esm/vs/platform/quickinput/browser/quickInputActions.js +42 -8
  251. package/esm/vs/platform/quickinput/browser/quickInputActions.js.map +1 -1
  252. package/esm/vs/platform/quickinput/browser/quickInputController.js +10 -64
  253. package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
  254. package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
  255. package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  256. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  257. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js +12 -0
  258. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js.map +1 -1
  259. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js +11 -5
  260. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js.map +1 -1
  261. package/esm/vs/platform/quickinput/common/quickInput.js.map +1 -1
  262. package/esm/vs/platform/theme/common/colorUtils.js +2 -2
  263. package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
  264. package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
  265. package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
  266. package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
  267. package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
  268. package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
  269. package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
  270. package/esm/vs/platform/theme/common/colors/miscColors.js +15 -15
  271. package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
  272. package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
  273. package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
  274. package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
  275. package/esm/vs/platform/workspace/common/workspace.js +1 -1
  276. package/monaco.d.ts +93 -85
  277. package/package.json +6 -2
  278. package/version.txt +1 -1
@@ -9,75 +9,75 @@ import { registerThemingParticipant } from '../../../platform/theme/common/theme
9
9
  /**
10
10
  * Definition of the editor colors
11
11
  */
12
- export const editorLineHighlight = registerColor('editor.lineHighlightBackground', null, nls.localize(604, 'Background color for the highlight of line at the cursor position.'));
13
- export const editorLineHighlightBorder = registerColor('editor.lineHighlightBorder', { dark: '#282828', light: '#eeeeee', hcDark: '#f38518', hcLight: contrastBorder }, nls.localize(605, 'Background color for the border around the line at the cursor position.'));
14
- export const editorRangeHighlight = registerColor('editor.rangeHighlightBackground', { dark: '#ffffff0b', light: '#fdff0033', hcDark: null, hcLight: null }, nls.localize(606, 'Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations.'), true);
15
- export const editorRangeHighlightBorder = registerColor('editor.rangeHighlightBorder', { dark: null, light: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, nls.localize(607, 'Background color of the border around highlighted ranges.'));
16
- export const editorSymbolHighlight = registerColor('editor.symbolHighlightBackground', { dark: editorFindMatchHighlight, light: editorFindMatchHighlight, hcDark: null, hcLight: null }, nls.localize(608, 'Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations.'), true);
17
- export const editorSymbolHighlightBorder = registerColor('editor.symbolHighlightBorder', { dark: null, light: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, nls.localize(609, 'Background color of the border around highlighted symbols.'));
18
- export const editorCursorForeground = registerColor('editorCursor.foreground', { dark: '#AEAFAD', light: Color.black, hcDark: Color.white, hcLight: '#0F4A85' }, nls.localize(610, 'Color of the editor cursor.'));
19
- export const editorCursorBackground = registerColor('editorCursor.background', null, nls.localize(611, 'The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.'));
20
- export const editorMultiCursorPrimaryForeground = registerColor('editorMultiCursor.primary.foreground', editorCursorForeground, nls.localize(612, 'Color of the primary editor cursor when multiple cursors are present.'));
21
- export const editorMultiCursorPrimaryBackground = registerColor('editorMultiCursor.primary.background', editorCursorBackground, nls.localize(613, 'The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.'));
22
- export const editorMultiCursorSecondaryForeground = registerColor('editorMultiCursor.secondary.foreground', editorCursorForeground, nls.localize(614, 'Color of secondary editor cursors when multiple cursors are present.'));
23
- export const editorMultiCursorSecondaryBackground = registerColor('editorMultiCursor.secondary.background', editorCursorBackground, nls.localize(615, 'The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.'));
24
- export const editorWhitespaces = registerColor('editorWhitespace.foreground', { dark: '#e3e4e229', light: '#33333333', hcDark: '#e3e4e229', hcLight: '#CCCCCC' }, nls.localize(616, 'Color of whitespace characters in the editor.'));
25
- export const editorLineNumbers = registerColor('editorLineNumber.foreground', { dark: '#858585', light: '#237893', hcDark: Color.white, hcLight: '#292929' }, nls.localize(617, 'Color of editor line numbers.'));
26
- export const deprecatedEditorIndentGuides = registerColor('editorIndentGuide.background', editorWhitespaces, nls.localize(618, 'Color of the editor indentation guides.'), false, nls.localize(619, '\'editorIndentGuide.background\' is deprecated. Use \'editorIndentGuide.background1\' instead.'));
27
- export const deprecatedEditorActiveIndentGuides = registerColor('editorIndentGuide.activeBackground', editorWhitespaces, nls.localize(620, 'Color of the active editor indentation guides.'), false, nls.localize(621, '\'editorIndentGuide.activeBackground\' is deprecated. Use \'editorIndentGuide.activeBackground1\' instead.'));
28
- export const editorIndentGuide1 = registerColor('editorIndentGuide.background1', deprecatedEditorIndentGuides, nls.localize(622, 'Color of the editor indentation guides (1).'));
29
- export const editorIndentGuide2 = registerColor('editorIndentGuide.background2', '#00000000', nls.localize(623, 'Color of the editor indentation guides (2).'));
30
- export const editorIndentGuide3 = registerColor('editorIndentGuide.background3', '#00000000', nls.localize(624, 'Color of the editor indentation guides (3).'));
31
- export const editorIndentGuide4 = registerColor('editorIndentGuide.background4', '#00000000', nls.localize(625, 'Color of the editor indentation guides (4).'));
32
- export const editorIndentGuide5 = registerColor('editorIndentGuide.background5', '#00000000', nls.localize(626, 'Color of the editor indentation guides (5).'));
33
- export const editorIndentGuide6 = registerColor('editorIndentGuide.background6', '#00000000', nls.localize(627, 'Color of the editor indentation guides (6).'));
34
- export const editorActiveIndentGuide1 = registerColor('editorIndentGuide.activeBackground1', deprecatedEditorActiveIndentGuides, nls.localize(628, 'Color of the active editor indentation guides (1).'));
35
- export const editorActiveIndentGuide2 = registerColor('editorIndentGuide.activeBackground2', '#00000000', nls.localize(629, 'Color of the active editor indentation guides (2).'));
36
- export const editorActiveIndentGuide3 = registerColor('editorIndentGuide.activeBackground3', '#00000000', nls.localize(630, 'Color of the active editor indentation guides (3).'));
37
- export const editorActiveIndentGuide4 = registerColor('editorIndentGuide.activeBackground4', '#00000000', nls.localize(631, 'Color of the active editor indentation guides (4).'));
38
- export const editorActiveIndentGuide5 = registerColor('editorIndentGuide.activeBackground5', '#00000000', nls.localize(632, 'Color of the active editor indentation guides (5).'));
39
- export const editorActiveIndentGuide6 = registerColor('editorIndentGuide.activeBackground6', '#00000000', nls.localize(633, 'Color of the active editor indentation guides (6).'));
40
- const deprecatedEditorActiveLineNumber = registerColor('editorActiveLineNumber.foreground', { dark: '#c6c6c6', light: '#0B216F', hcDark: activeContrastBorder, hcLight: activeContrastBorder }, nls.localize(634, 'Color of editor active line number'), false, nls.localize(635, 'Id is deprecated. Use \'editorLineNumber.activeForeground\' instead.'));
41
- export const editorActiveLineNumber = registerColor('editorLineNumber.activeForeground', deprecatedEditorActiveLineNumber, nls.localize(636, 'Color of editor active line number'));
42
- export const editorDimmedLineNumber = registerColor('editorLineNumber.dimmedForeground', null, nls.localize(637, 'Color of the final editor line when editor.renderFinalNewline is set to dimmed.'));
43
- export const editorRuler = registerColor('editorRuler.foreground', { dark: '#5A5A5A', light: Color.lightgrey, hcDark: Color.white, hcLight: '#292929' }, nls.localize(638, 'Color of the editor rulers.'));
44
- export const editorCodeLensForeground = registerColor('editorCodeLens.foreground', { dark: '#999999', light: '#919191', hcDark: '#999999', hcLight: '#292929' }, nls.localize(639, 'Foreground color of editor CodeLens'));
45
- export const editorBracketMatchBackground = registerColor('editorBracketMatch.background', { dark: '#0064001a', light: '#0064001a', hcDark: '#0064001a', hcLight: '#0000' }, nls.localize(640, 'Background color behind matching brackets'));
46
- export const editorBracketMatchBorder = registerColor('editorBracketMatch.border', { dark: '#888', light: '#B9B9B9', hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize(641, 'Color for matching brackets boxes'));
47
- export const editorOverviewRulerBorder = registerColor('editorOverviewRuler.border', { dark: '#7f7f7f4d', light: '#7f7f7f4d', hcDark: '#7f7f7f4d', hcLight: '#666666' }, nls.localize(642, 'Color of the overview ruler border.'));
48
- export const editorOverviewRulerBackground = registerColor('editorOverviewRuler.background', null, nls.localize(643, 'Background color of the editor overview ruler.'));
49
- export const editorGutter = registerColor('editorGutter.background', editorBackground, nls.localize(644, 'Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.'));
50
- export const editorUnnecessaryCodeBorder = registerColor('editorUnnecessaryCode.border', { dark: null, light: null, hcDark: Color.fromHex('#fff').transparent(0.8), hcLight: contrastBorder }, nls.localize(645, 'Border color of unnecessary (unused) source code in the editor.'));
51
- export const editorUnnecessaryCodeOpacity = registerColor('editorUnnecessaryCode.opacity', { dark: Color.fromHex('#000a'), light: Color.fromHex('#0007'), hcDark: null, hcLight: null }, nls.localize(646, 'Opacity of unnecessary (unused) source code in the editor. For example, "#000000c0" will render the code with 75% opacity. For high contrast themes, use the \'editorUnnecessaryCode.border\' theme color to underline unnecessary code instead of fading it out.'));
52
- export const ghostTextBorder = registerColor('editorGhostText.border', { dark: null, light: null, hcDark: Color.fromHex('#fff').transparent(0.8), hcLight: Color.fromHex('#292929').transparent(0.8) }, nls.localize(647, 'Border color of ghost text in the editor.'));
53
- export const ghostTextForeground = registerColor('editorGhostText.foreground', { dark: Color.fromHex('#ffffff56'), light: Color.fromHex('#0007'), hcDark: null, hcLight: null }, nls.localize(648, 'Foreground color of the ghost text in the editor.'));
54
- export const ghostTextBackground = registerColor('editorGhostText.background', null, nls.localize(649, 'Background color of the ghost text in the editor.'));
12
+ export const editorLineHighlight = registerColor('editor.lineHighlightBackground', null, nls.localize(605, 'Background color for the highlight of line at the cursor position.'));
13
+ export const editorLineHighlightBorder = registerColor('editor.lineHighlightBorder', { dark: '#282828', light: '#eeeeee', hcDark: '#f38518', hcLight: contrastBorder }, nls.localize(606, 'Background color for the border around the line at the cursor position.'));
14
+ export const editorRangeHighlight = registerColor('editor.rangeHighlightBackground', { dark: '#ffffff0b', light: '#fdff0033', hcDark: null, hcLight: null }, nls.localize(607, 'Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations.'), true);
15
+ export const editorRangeHighlightBorder = registerColor('editor.rangeHighlightBorder', { dark: null, light: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, nls.localize(608, 'Background color of the border around highlighted ranges.'));
16
+ export const editorSymbolHighlight = registerColor('editor.symbolHighlightBackground', { dark: editorFindMatchHighlight, light: editorFindMatchHighlight, hcDark: null, hcLight: null }, nls.localize(609, 'Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations.'), true);
17
+ export const editorSymbolHighlightBorder = registerColor('editor.symbolHighlightBorder', { dark: null, light: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, nls.localize(610, 'Background color of the border around highlighted symbols.'));
18
+ export const editorCursorForeground = registerColor('editorCursor.foreground', { dark: '#AEAFAD', light: Color.black, hcDark: Color.white, hcLight: '#0F4A85' }, nls.localize(611, 'Color of the editor cursor.'));
19
+ export const editorCursorBackground = registerColor('editorCursor.background', null, nls.localize(612, 'The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.'));
20
+ export const editorMultiCursorPrimaryForeground = registerColor('editorMultiCursor.primary.foreground', editorCursorForeground, nls.localize(613, 'Color of the primary editor cursor when multiple cursors are present.'));
21
+ export const editorMultiCursorPrimaryBackground = registerColor('editorMultiCursor.primary.background', editorCursorBackground, nls.localize(614, 'The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.'));
22
+ export const editorMultiCursorSecondaryForeground = registerColor('editorMultiCursor.secondary.foreground', editorCursorForeground, nls.localize(615, 'Color of secondary editor cursors when multiple cursors are present.'));
23
+ export const editorMultiCursorSecondaryBackground = registerColor('editorMultiCursor.secondary.background', editorCursorBackground, nls.localize(616, 'The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.'));
24
+ export const editorWhitespaces = registerColor('editorWhitespace.foreground', { dark: '#e3e4e229', light: '#33333333', hcDark: '#e3e4e229', hcLight: '#CCCCCC' }, nls.localize(617, 'Color of whitespace characters in the editor.'));
25
+ export const editorLineNumbers = registerColor('editorLineNumber.foreground', { dark: '#858585', light: '#237893', hcDark: Color.white, hcLight: '#292929' }, nls.localize(618, 'Color of editor line numbers.'));
26
+ export const deprecatedEditorIndentGuides = registerColor('editorIndentGuide.background', editorWhitespaces, nls.localize(619, 'Color of the editor indentation guides.'), false, nls.localize(620, '\'editorIndentGuide.background\' is deprecated. Use \'editorIndentGuide.background1\' instead.'));
27
+ export const deprecatedEditorActiveIndentGuides = registerColor('editorIndentGuide.activeBackground', editorWhitespaces, nls.localize(621, 'Color of the active editor indentation guides.'), false, nls.localize(622, '\'editorIndentGuide.activeBackground\' is deprecated. Use \'editorIndentGuide.activeBackground1\' instead.'));
28
+ export const editorIndentGuide1 = registerColor('editorIndentGuide.background1', deprecatedEditorIndentGuides, nls.localize(623, 'Color of the editor indentation guides (1).'));
29
+ export const editorIndentGuide2 = registerColor('editorIndentGuide.background2', '#00000000', nls.localize(624, 'Color of the editor indentation guides (2).'));
30
+ export const editorIndentGuide3 = registerColor('editorIndentGuide.background3', '#00000000', nls.localize(625, 'Color of the editor indentation guides (3).'));
31
+ export const editorIndentGuide4 = registerColor('editorIndentGuide.background4', '#00000000', nls.localize(626, 'Color of the editor indentation guides (4).'));
32
+ export const editorIndentGuide5 = registerColor('editorIndentGuide.background5', '#00000000', nls.localize(627, 'Color of the editor indentation guides (5).'));
33
+ export const editorIndentGuide6 = registerColor('editorIndentGuide.background6', '#00000000', nls.localize(628, 'Color of the editor indentation guides (6).'));
34
+ export const editorActiveIndentGuide1 = registerColor('editorIndentGuide.activeBackground1', deprecatedEditorActiveIndentGuides, nls.localize(629, 'Color of the active editor indentation guides (1).'));
35
+ export const editorActiveIndentGuide2 = registerColor('editorIndentGuide.activeBackground2', '#00000000', nls.localize(630, 'Color of the active editor indentation guides (2).'));
36
+ export const editorActiveIndentGuide3 = registerColor('editorIndentGuide.activeBackground3', '#00000000', nls.localize(631, 'Color of the active editor indentation guides (3).'));
37
+ export const editorActiveIndentGuide4 = registerColor('editorIndentGuide.activeBackground4', '#00000000', nls.localize(632, 'Color of the active editor indentation guides (4).'));
38
+ export const editorActiveIndentGuide5 = registerColor('editorIndentGuide.activeBackground5', '#00000000', nls.localize(633, 'Color of the active editor indentation guides (5).'));
39
+ export const editorActiveIndentGuide6 = registerColor('editorIndentGuide.activeBackground6', '#00000000', nls.localize(634, 'Color of the active editor indentation guides (6).'));
40
+ const deprecatedEditorActiveLineNumber = registerColor('editorActiveLineNumber.foreground', { dark: '#c6c6c6', light: '#0B216F', hcDark: activeContrastBorder, hcLight: activeContrastBorder }, nls.localize(635, 'Color of editor active line number'), false, nls.localize(636, 'Id is deprecated. Use \'editorLineNumber.activeForeground\' instead.'));
41
+ export const editorActiveLineNumber = registerColor('editorLineNumber.activeForeground', deprecatedEditorActiveLineNumber, nls.localize(637, 'Color of editor active line number'));
42
+ export const editorDimmedLineNumber = registerColor('editorLineNumber.dimmedForeground', null, nls.localize(638, 'Color of the final editor line when editor.renderFinalNewline is set to dimmed.'));
43
+ export const editorRuler = registerColor('editorRuler.foreground', { dark: '#5A5A5A', light: Color.lightgrey, hcDark: Color.white, hcLight: '#292929' }, nls.localize(639, 'Color of the editor rulers.'));
44
+ export const editorCodeLensForeground = registerColor('editorCodeLens.foreground', { dark: '#999999', light: '#919191', hcDark: '#999999', hcLight: '#292929' }, nls.localize(640, 'Foreground color of editor CodeLens'));
45
+ export const editorBracketMatchBackground = registerColor('editorBracketMatch.background', { dark: '#0064001a', light: '#0064001a', hcDark: '#0064001a', hcLight: '#0000' }, nls.localize(641, 'Background color behind matching brackets'));
46
+ export const editorBracketMatchBorder = registerColor('editorBracketMatch.border', { dark: '#888', light: '#B9B9B9', hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize(642, 'Color for matching brackets boxes'));
47
+ export const editorOverviewRulerBorder = registerColor('editorOverviewRuler.border', { dark: '#7f7f7f4d', light: '#7f7f7f4d', hcDark: '#7f7f7f4d', hcLight: '#666666' }, nls.localize(643, 'Color of the overview ruler border.'));
48
+ export const editorOverviewRulerBackground = registerColor('editorOverviewRuler.background', null, nls.localize(644, 'Background color of the editor overview ruler.'));
49
+ export const editorGutter = registerColor('editorGutter.background', editorBackground, nls.localize(645, 'Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.'));
50
+ export const editorUnnecessaryCodeBorder = registerColor('editorUnnecessaryCode.border', { dark: null, light: null, hcDark: Color.fromHex('#fff').transparent(0.8), hcLight: contrastBorder }, nls.localize(646, 'Border color of unnecessary (unused) source code in the editor.'));
51
+ export const editorUnnecessaryCodeOpacity = registerColor('editorUnnecessaryCode.opacity', { dark: Color.fromHex('#000a'), light: Color.fromHex('#0007'), hcDark: null, hcLight: null }, nls.localize(647, 'Opacity of unnecessary (unused) source code in the editor. For example, "#000000c0" will render the code with 75% opacity. For high contrast themes, use the \'editorUnnecessaryCode.border\' theme color to underline unnecessary code instead of fading it out.'));
52
+ export const ghostTextBorder = registerColor('editorGhostText.border', { dark: null, light: null, hcDark: Color.fromHex('#fff').transparent(0.8), hcLight: Color.fromHex('#292929').transparent(0.8) }, nls.localize(648, 'Border color of ghost text in the editor.'));
53
+ export const ghostTextForeground = registerColor('editorGhostText.foreground', { dark: Color.fromHex('#ffffff56'), light: Color.fromHex('#0007'), hcDark: null, hcLight: null }, nls.localize(649, 'Foreground color of the ghost text in the editor.'));
54
+ export const ghostTextBackground = registerColor('editorGhostText.background', null, nls.localize(650, 'Background color of the ghost text in the editor.'));
55
55
  const rulerRangeDefault = new Color(new RGBA(0, 122, 204, 0.6));
56
- export const overviewRulerRangeHighlight = registerColor('editorOverviewRuler.rangeHighlightForeground', rulerRangeDefault, nls.localize(650, 'Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations.'), true);
57
- export const overviewRulerError = registerColor('editorOverviewRuler.errorForeground', { dark: new Color(new RGBA(255, 18, 18, 0.7)), light: new Color(new RGBA(255, 18, 18, 0.7)), hcDark: new Color(new RGBA(255, 50, 50, 1)), hcLight: '#B5200D' }, nls.localize(651, 'Overview ruler marker color for errors.'));
58
- export const overviewRulerWarning = registerColor('editorOverviewRuler.warningForeground', { dark: editorWarningForeground, light: editorWarningForeground, hcDark: editorWarningBorder, hcLight: editorWarningBorder }, nls.localize(652, 'Overview ruler marker color for warnings.'));
59
- export const overviewRulerInfo = registerColor('editorOverviewRuler.infoForeground', { dark: editorInfoForeground, light: editorInfoForeground, hcDark: editorInfoBorder, hcLight: editorInfoBorder }, nls.localize(653, 'Overview ruler marker color for infos.'));
60
- export const editorBracketHighlightingForeground1 = registerColor('editorBracketHighlight.foreground1', { dark: '#FFD700', light: '#0431FAFF', hcDark: '#FFD700', hcLight: '#0431FAFF' }, nls.localize(654, 'Foreground color of brackets (1). Requires enabling bracket pair colorization.'));
61
- export const editorBracketHighlightingForeground2 = registerColor('editorBracketHighlight.foreground2', { dark: '#DA70D6', light: '#319331FF', hcDark: '#DA70D6', hcLight: '#319331FF' }, nls.localize(655, 'Foreground color of brackets (2). Requires enabling bracket pair colorization.'));
62
- export const editorBracketHighlightingForeground3 = registerColor('editorBracketHighlight.foreground3', { dark: '#179FFF', light: '#7B3814FF', hcDark: '#87CEFA', hcLight: '#7B3814FF' }, nls.localize(656, 'Foreground color of brackets (3). Requires enabling bracket pair colorization.'));
63
- export const editorBracketHighlightingForeground4 = registerColor('editorBracketHighlight.foreground4', '#00000000', nls.localize(657, 'Foreground color of brackets (4). Requires enabling bracket pair colorization.'));
64
- export const editorBracketHighlightingForeground5 = registerColor('editorBracketHighlight.foreground5', '#00000000', nls.localize(658, 'Foreground color of brackets (5). Requires enabling bracket pair colorization.'));
65
- export const editorBracketHighlightingForeground6 = registerColor('editorBracketHighlight.foreground6', '#00000000', nls.localize(659, 'Foreground color of brackets (6). Requires enabling bracket pair colorization.'));
66
- export const editorBracketHighlightingUnexpectedBracketForeground = registerColor('editorBracketHighlight.unexpectedBracket.foreground', { dark: new Color(new RGBA(255, 18, 18, 0.8)), light: new Color(new RGBA(255, 18, 18, 0.8)), hcDark: new Color(new RGBA(255, 50, 50, 1)), hcLight: '#B5200D' }, nls.localize(660, 'Foreground color of unexpected brackets.'));
67
- export const editorBracketPairGuideBackground1 = registerColor('editorBracketPairGuide.background1', '#00000000', nls.localize(661, 'Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.'));
68
- export const editorBracketPairGuideBackground2 = registerColor('editorBracketPairGuide.background2', '#00000000', nls.localize(662, 'Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.'));
69
- export const editorBracketPairGuideBackground3 = registerColor('editorBracketPairGuide.background3', '#00000000', nls.localize(663, 'Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.'));
70
- export const editorBracketPairGuideBackground4 = registerColor('editorBracketPairGuide.background4', '#00000000', nls.localize(664, 'Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.'));
71
- export const editorBracketPairGuideBackground5 = registerColor('editorBracketPairGuide.background5', '#00000000', nls.localize(665, 'Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.'));
72
- export const editorBracketPairGuideBackground6 = registerColor('editorBracketPairGuide.background6', '#00000000', nls.localize(666, 'Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.'));
73
- export const editorBracketPairGuideActiveBackground1 = registerColor('editorBracketPairGuide.activeBackground1', '#00000000', nls.localize(667, 'Background color of active bracket pair guides (1). Requires enabling bracket pair guides.'));
74
- export const editorBracketPairGuideActiveBackground2 = registerColor('editorBracketPairGuide.activeBackground2', '#00000000', nls.localize(668, 'Background color of active bracket pair guides (2). Requires enabling bracket pair guides.'));
75
- export const editorBracketPairGuideActiveBackground3 = registerColor('editorBracketPairGuide.activeBackground3', '#00000000', nls.localize(669, 'Background color of active bracket pair guides (3). Requires enabling bracket pair guides.'));
76
- export const editorBracketPairGuideActiveBackground4 = registerColor('editorBracketPairGuide.activeBackground4', '#00000000', nls.localize(670, 'Background color of active bracket pair guides (4). Requires enabling bracket pair guides.'));
77
- export const editorBracketPairGuideActiveBackground5 = registerColor('editorBracketPairGuide.activeBackground5', '#00000000', nls.localize(671, 'Background color of active bracket pair guides (5). Requires enabling bracket pair guides.'));
78
- export const editorBracketPairGuideActiveBackground6 = registerColor('editorBracketPairGuide.activeBackground6', '#00000000', nls.localize(672, 'Background color of active bracket pair guides (6). Requires enabling bracket pair guides.'));
79
- export const editorUnicodeHighlightBorder = registerColor('editorUnicodeHighlight.border', editorWarningForeground, nls.localize(673, 'Border color used to highlight unicode characters.'));
80
- export const editorUnicodeHighlightBackground = registerColor('editorUnicodeHighlight.background', editorWarningBackground, nls.localize(674, 'Background color used to highlight unicode characters.'));
56
+ export const overviewRulerRangeHighlight = registerColor('editorOverviewRuler.rangeHighlightForeground', rulerRangeDefault, nls.localize(651, 'Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations.'), true);
57
+ export const overviewRulerError = registerColor('editorOverviewRuler.errorForeground', { dark: new Color(new RGBA(255, 18, 18, 0.7)), light: new Color(new RGBA(255, 18, 18, 0.7)), hcDark: new Color(new RGBA(255, 50, 50, 1)), hcLight: '#B5200D' }, nls.localize(652, 'Overview ruler marker color for errors.'));
58
+ export const overviewRulerWarning = registerColor('editorOverviewRuler.warningForeground', { dark: editorWarningForeground, light: editorWarningForeground, hcDark: editorWarningBorder, hcLight: editorWarningBorder }, nls.localize(653, 'Overview ruler marker color for warnings.'));
59
+ export const overviewRulerInfo = registerColor('editorOverviewRuler.infoForeground', { dark: editorInfoForeground, light: editorInfoForeground, hcDark: editorInfoBorder, hcLight: editorInfoBorder }, nls.localize(654, 'Overview ruler marker color for infos.'));
60
+ export const editorBracketHighlightingForeground1 = registerColor('editorBracketHighlight.foreground1', { dark: '#FFD700', light: '#0431FAFF', hcDark: '#FFD700', hcLight: '#0431FAFF' }, nls.localize(655, 'Foreground color of brackets (1). Requires enabling bracket pair colorization.'));
61
+ export const editorBracketHighlightingForeground2 = registerColor('editorBracketHighlight.foreground2', { dark: '#DA70D6', light: '#319331FF', hcDark: '#DA70D6', hcLight: '#319331FF' }, nls.localize(656, 'Foreground color of brackets (2). Requires enabling bracket pair colorization.'));
62
+ export const editorBracketHighlightingForeground3 = registerColor('editorBracketHighlight.foreground3', { dark: '#179FFF', light: '#7B3814FF', hcDark: '#87CEFA', hcLight: '#7B3814FF' }, nls.localize(657, 'Foreground color of brackets (3). Requires enabling bracket pair colorization.'));
63
+ export const editorBracketHighlightingForeground4 = registerColor('editorBracketHighlight.foreground4', '#00000000', nls.localize(658, 'Foreground color of brackets (4). Requires enabling bracket pair colorization.'));
64
+ export const editorBracketHighlightingForeground5 = registerColor('editorBracketHighlight.foreground5', '#00000000', nls.localize(659, 'Foreground color of brackets (5). Requires enabling bracket pair colorization.'));
65
+ export const editorBracketHighlightingForeground6 = registerColor('editorBracketHighlight.foreground6', '#00000000', nls.localize(660, 'Foreground color of brackets (6). Requires enabling bracket pair colorization.'));
66
+ export const editorBracketHighlightingUnexpectedBracketForeground = registerColor('editorBracketHighlight.unexpectedBracket.foreground', { dark: new Color(new RGBA(255, 18, 18, 0.8)), light: new Color(new RGBA(255, 18, 18, 0.8)), hcDark: new Color(new RGBA(255, 50, 50, 1)), hcLight: '#B5200D' }, nls.localize(661, 'Foreground color of unexpected brackets.'));
67
+ export const editorBracketPairGuideBackground1 = registerColor('editorBracketPairGuide.background1', '#00000000', nls.localize(662, 'Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.'));
68
+ export const editorBracketPairGuideBackground2 = registerColor('editorBracketPairGuide.background2', '#00000000', nls.localize(663, 'Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.'));
69
+ export const editorBracketPairGuideBackground3 = registerColor('editorBracketPairGuide.background3', '#00000000', nls.localize(664, 'Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.'));
70
+ export const editorBracketPairGuideBackground4 = registerColor('editorBracketPairGuide.background4', '#00000000', nls.localize(665, 'Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.'));
71
+ export const editorBracketPairGuideBackground5 = registerColor('editorBracketPairGuide.background5', '#00000000', nls.localize(666, 'Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.'));
72
+ export const editorBracketPairGuideBackground6 = registerColor('editorBracketPairGuide.background6', '#00000000', nls.localize(667, 'Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.'));
73
+ export const editorBracketPairGuideActiveBackground1 = registerColor('editorBracketPairGuide.activeBackground1', '#00000000', nls.localize(668, 'Background color of active bracket pair guides (1). Requires enabling bracket pair guides.'));
74
+ export const editorBracketPairGuideActiveBackground2 = registerColor('editorBracketPairGuide.activeBackground2', '#00000000', nls.localize(669, 'Background color of active bracket pair guides (2). Requires enabling bracket pair guides.'));
75
+ export const editorBracketPairGuideActiveBackground3 = registerColor('editorBracketPairGuide.activeBackground3', '#00000000', nls.localize(670, 'Background color of active bracket pair guides (3). Requires enabling bracket pair guides.'));
76
+ export const editorBracketPairGuideActiveBackground4 = registerColor('editorBracketPairGuide.activeBackground4', '#00000000', nls.localize(671, 'Background color of active bracket pair guides (4). Requires enabling bracket pair guides.'));
77
+ export const editorBracketPairGuideActiveBackground5 = registerColor('editorBracketPairGuide.activeBackground5', '#00000000', nls.localize(672, 'Background color of active bracket pair guides (5). Requires enabling bracket pair guides.'));
78
+ export const editorBracketPairGuideActiveBackground6 = registerColor('editorBracketPairGuide.activeBackground6', '#00000000', nls.localize(673, 'Background color of active bracket pair guides (6). Requires enabling bracket pair guides.'));
79
+ export const editorUnicodeHighlightBorder = registerColor('editorUnicodeHighlight.border', editorWarningForeground, nls.localize(674, 'Border color used to highlight unicode characters.'));
80
+ export const editorUnicodeHighlightBackground = registerColor('editorUnicodeHighlight.background', editorWarningBackground, nls.localize(675, 'Background color used to highlight unicode characters.'));
81
81
  // contains all color rules that used to defined in editor/browser/widget/editor.css
82
82
  registerThemingParticipant((theme, collector) => {
83
83
  const background = theme.getColor(editorBackground);
@@ -14,6 +14,9 @@ export class LineRange {
14
14
  static ofLength(startLineNumber, length) {
15
15
  return new LineRange(startLineNumber, startLineNumber + length);
16
16
  }
17
+ static fromRange(range) {
18
+ return new LineRange(range.startLineNumber, range.endLineNumber);
19
+ }
17
20
  static fromRangeInclusive(range) {
18
21
  return new LineRange(range.startLineNumber, range.endLineNumber + 1);
19
22
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/common/core/ranges/lineRange.ts","vs/editor/common/core/ranges/lineRange.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,8BAA8B,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAClI,OAAO,EAAc,SAAS,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAE5F;;GAEG;AACH,MAAM,OAAO,SAAS;IACd,MAAM,CAAC,QAAQ,CAAC,eAAuB,EAAE,MAAc;QAC7D,OAAO,IAAI,SAAS,CAAC,eAAe,EAAE,eAAe,GAAG,MAAM,CAAC,CAAC;IACjE,CAAC;IAEM,MAAM,CAAC,kBAAkB,CAAC,KAAY;QAC5C,OAAO,IAAI,SAAS,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,aAAa,GAAG,CAAC,CAAC,CAAC;IACtE,CAAC;aAEsB,mBAAc,GAA0B,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;IAEnH;;OAEG;IACI,MAAM,CA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;QACP,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjE,CAAC;IAED,eAAe,CAAC,KAAmB;QAClC,MAAM,MAAM,GAAgB,EAAE,CAAC;QAE/B,IAAI,EAAE,GAAG,CAAC,CAAC;QACX,IAAI,EAAE,GAAG,CAAC,CAAC;QACX,OAAO,EAAE,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,IAAI,EAAE,GAAG,KAAK,CAAC,iBAAiB,CAAC,MAAM,EAAE,CAAC;YAClF,MAAM,EAAE,GAAG,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;YACtC,MAAM,EAAE,GAAG,KAAK,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;YAEvC,MAAM,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;YAC3B,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;gBACrB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAChB,CAAC;YAED,IAAI,EAAE,CAAC,sBAAsB,GAAG,EAAE,CAAC,sBAAsB,EAAE,CAAC;gBAC3D,EAAE,EAAE,CAAC;YACN,CAAC;iBAAM,CAAC;gBACP,EAAE,EAAE,CAAC;YACN,CAAC;QACF,CAAC;QAED,OAAO,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IAED,YAAY,CAAC,KAAa;QACzB,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1E,CAAC;CACD","file":"lineRange.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 { BugIndicatingError } from '../../../../base/common/errors.js';\nimport { OffsetRange } from './offsetRange.js';\nimport { Range } from '../range.js';\nimport { findFirstIdxMonotonousOrArrLen, findLastIdxMonotonous, findLastMonotonous } from '../../../../base/common/arraysFind.js';\nimport { Comparator, compareBy, numberComparator } from '../../../../base/common/arrays.js';\n\n/**\n * A range of lines (1-based).\n */\nexport class LineRange {\n\tpublic static ofLength(startLineNumber: number, length: number): LineRange {\n\t\treturn new LineRange(startLineNumber, startLineNumber + length);\n\t}\n\n\tpublic static fromRangeInclusive(range: Range): LineRange {\n\t\treturn new LineRange(range.startLineNumber, range.endLineNumber + 1);\n\t}\n\n\tpublic static readonly compareByStart: Comparator<LineRange> = compareBy(l => l.startLineNumber, numberComparator);\n\n\t/**\n\t * @param lineRanges An array of arrays of of sorted line ranges.\n\t */\n\tpublic static joinMany(lineRanges: readonly (readonly LineRange[])[]): readonly LineRange[] {\n\t\tif (lineRanges.length === 0) {\n\t\t\treturn [];\n\t\t}\n\t\tlet result = new LineRangeSet(lineRanges[0].slice());\n\t\tfor (let i = 1; i < lineRanges.length; i++) {\n\t\t\tresult = result.getUnion(new LineRangeSet(lineRanges[i].slice()));\n\t\t}\n\t\treturn result.ranges;\n\t}\n\n\tpublic static join(lineRanges: LineRange[]): LineRange {\n\t\tif (lineRanges.length === 0) {\n\t\t\tthrow new BugIndicatingError('lineRanges cannot be empty');\n\t\t}\n\t\tlet startLineNumber = lineRanges[0].startLineNumber;\n\t\tlet endLineNumberExclusive = lineRanges[0].endLineNumberExclusive;\n\t\tfor (let i = 1; i < lineRanges.length; i++) {\n\t\t\tstartLineNumber = Math.min(startLineNumber, lineRanges[i].startLineNumber);\n\t\t\tendLineNumberExclusive = Math.max(endLineNumberExclusive, lineRanges[i].endLineNumberExclusive);\n\t\t}\n\t\treturn new LineRange(startLineNumber, endLineNumberExclusive);\n\t}\n\n\t/**\n\t * @internal\n\t */\n\tpublic static deserialize(lineRange: ISerializedLineRange): LineRange {\n\t\treturn new LineRange(lineRange[0], lineRange[1]);\n\t}\n\n\t/**\n\t * The start line number.\n\t */\n\tpublic readonly startLineNumber: number;\n\n\t/**\n\t * The end line number (exclusive).\n\t */\n\tpublic readonly endLineNumberExclusive: number;\n\n\tconstructor(\n\t\tstartLineNumber: number,\n\t\tendLineNumberExclusive: number,\n\t) {\n\t\tif (startLineNumber > endLineNumberExclusive) {\n\t\t\tthrow new BugIndicatingError(`startLineNumber ${startLineNumber} cannot be after endLineNumberExclusive ${endLineNumberExclusive}`);\n\t\t}\n\t\tthis.startLineNumber = startLineNumber;\n\t\tthis.endLineNumberExclusive = endLineNumberExclusive;\n\t}\n\n\t/**\n\t * Indicates if this line range contains the given line number.\n\t */\n\tpublic contains(lineNumber: number): boolean {\n\t\treturn this.startLineNumber <= lineNumber && lineNumber < this.endLineNumberExclusive;\n\t}\n\n\t/**\n\t * Indicates if this line range is empty.\n\t */\n\tget isEmpty(): boolean {\n\t\treturn this.startLineNumber === this.endLineNumberExclusive;\n\t}\n\n\t/**\n\t * Moves this line range by the given offset of line numbers.\n\t */\n\tpublic delta(offset: number): LineRange {\n\t\treturn new LineRange(this.startLineNumber + offset, this.endLineNumberExclusive + offset);\n\t}\n\n\tpublic deltaLength(offset: number): LineRange {\n\t\treturn new LineRange(this.startLineNumber, this.endLineNumberExclusive + offset);\n\t}\n\n\t/**\n\t * The number of lines this line range spans.\n\t */\n\tpublic get length(): number {\n\t\treturn this.endLineNumberExclusive - this.startLineNumber;\n\t}\n\n\t/**\n\t * Creates a line range that combines this and the given line range.\n\t */\n\tpublic join(other: LineRange): LineRange {\n\t\treturn new LineRange(\n\t\t\tMath.min(this.startLineNumber, other.startLineNumber),\n\t\t\tMath.max(this.endLineNumberExclusive, other.endLineNumberExclusive)\n\t\t);\n\t}\n\n\tpublic toString(): string {\n\t\treturn `[${this.startLineNumber},${this.endLineNumberExclusive})`;\n\t}\n\n\t/**\n\t * The resulting range is empty if the ranges do not intersect, but touch.\n\t * If the ranges don't even touch, the result is undefined.\n\t */\n\tpublic intersect(other: LineRange): LineRange | undefined {\n\t\tconst startLineNumber = Math.max(this.startLineNumber, other.startLineNumber);\n\t\tconst endLineNumberExclusive = Math.min(this.endLineNumberExclusive, other.endLineNumberExclusive);\n\t\tif (startLineNumber <= endLineNumberExclusive) {\n\t\t\treturn new LineRange(startLineNumber, endLineNumberExclusive);\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tpublic intersectsStrict(other: LineRange): boolean {\n\t\treturn this.startLineNumber < other.endLineNumberExclusive && other.startLineNumber < this.endLineNumberExclusive;\n\t}\n\n\tpublic intersectsOrTouches(other: LineRange): boolean {\n\t\treturn this.startLineNumber <= other.endLineNumberExclusive && other.startLineNumber <= this.endLineNumberExclusive;\n\t}\n\n\tpublic equals(b: LineRange): boolean {\n\t\treturn this.startLineNumber === b.startLineNumber && this.endLineNumberExclusive === b.endLineNumberExclusive;\n\t}\n\n\tpublic toInclusiveRange(): Range | null {\n\t\tif (this.isEmpty) {\n\t\t\treturn null;\n\t\t}\n\t\treturn new Range(this.startLineNumber, 1, this.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER);\n\t}\n\n\t/**\n\t * @deprecated Using this function is discouraged because it might lead to bugs: The end position is not guaranteed to be a valid position!\n\t*/\n\tpublic toExclusiveRange(): Range {\n\t\treturn new Range(this.startLineNumber, 1, this.endLineNumberExclusive, 1);\n\t}\n\n\tpublic mapToLineArray<T>(f: (lineNumber: number) => T): T[] {\n\t\tconst result: T[] = [];\n\t\tfor (let lineNumber = this.startLineNumber; lineNumber < this.endLineNumberExclusive; lineNumber++) {\n\t\t\tresult.push(f(lineNumber));\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic forEach(f: (lineNumber: number) => void): void {\n\t\tfor (let lineNumber = this.startLineNumber; lineNumber < this.endLineNumberExclusive; lineNumber++) {\n\t\t\tf(lineNumber);\n\t\t}\n\t}\n\n\t/**\n\t * @internal\n\t */\n\tpublic serialize(): ISerializedLineRange {\n\t\treturn [this.startLineNumber, this.endLineNumberExclusive];\n\t}\n\n\t/**\n\t * Converts this 1-based line range to a 0-based offset range (subtracts 1!).\n\t * @internal\n\t */\n\tpublic toOffsetRange(): OffsetRange {\n\t\treturn new OffsetRange(this.startLineNumber - 1, this.endLineNumberExclusive - 1);\n\t}\n\n\tpublic addMargin(marginTop: number, marginBottom: number): LineRange {\n\t\treturn new LineRange(\n\t\t\tthis.startLineNumber - marginTop,\n\t\t\tthis.endLineNumberExclusive + marginBottom\n\t\t);\n\t}\n}\n\nexport type ISerializedLineRange = [startLineNumber: number, endLineNumberExclusive: number];\n\n\nexport class LineRangeSet {\n\tconstructor(\n\t\t/**\n\t\t * Sorted by start line number.\n\t\t * No two line ranges are touching or intersecting.\n\t\t */\n\t\tprivate readonly _normalizedRanges: LineRange[] = []\n\t) {\n\t}\n\n\tget ranges(): readonly LineRange[] {\n\t\treturn this._normalizedRanges;\n\t}\n\n\taddRange(range: LineRange): void {\n\t\tif (range.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Idea: Find joinRange such that:\n\t\t// replaceRange = _normalizedRanges.replaceRange(joinRange, range.joinAll(joinRange.map(idx => this._normalizedRanges[idx])))\n\n\t\t// idx of first element that touches range or that is after range\n\t\tconst joinRangeStartIdx = findFirstIdxMonotonousOrArrLen(this._normalizedRanges, r => r.endLineNumberExclusive >= range.startLineNumber);\n\t\t// idx of element after { last element that touches range or that is before range }\n\t\tconst joinRangeEndIdxExclusive = findLastIdxMonotonous(this._normalizedRanges, r => r.startLineNumber <= range.endLineNumberExclusive) + 1;\n\n\t\tif (joinRangeStartIdx === joinRangeEndIdxExclusive) {\n\t\t\t// If there is no element that touches range, then joinRangeStartIdx === joinRangeEndIdxExclusive and that value is the index of the element after range\n\t\t\tthis._normalizedRanges.splice(joinRangeStartIdx, 0, range);\n\t\t} else if (joinRangeStartIdx === joinRangeEndIdxExclusive - 1) {\n\t\t\t// Else, there is an element that touches range and in this case it is both the first and last element. Thus we can replace it\n\t\t\tconst joinRange = this._normalizedRanges[joinRangeStartIdx];\n\t\t\tthis._normalizedRanges[joinRangeStartIdx] = joinRange.join(range);\n\t\t} else {\n\t\t\t// First and last element are different - we need to replace the entire range\n\t\t\tconst joinRange = this._normalizedRanges[joinRangeStartIdx].join(this._normalizedRanges[joinRangeEndIdxExclusive - 1]).join(range);\n\t\t\tthis._normalizedRanges.splice(joinRangeStartIdx, joinRangeEndIdxExclusive - joinRangeStartIdx, joinRange);\n\t\t}\n\t}\n\n\tcontains(lineNumber: number): boolean {\n\t\tconst rangeThatStartsBeforeEnd = findLastMonotonous(this._normalizedRanges, r => r.startLineNumber <= lineNumber);\n\t\treturn !!rangeThatStartsBeforeEnd && rangeThatStartsBeforeEnd.endLineNumberExclusive > lineNumber;\n\t}\n\n\tintersects(range: LineRange): boolean {\n\t\tconst rangeThatStartsBeforeEnd = findLastMonotonous(this._normalizedRanges, r => r.startLineNumber < range.endLineNumberExclusive);\n\t\treturn !!rangeThatStartsBeforeEnd && rangeThatStartsBeforeEnd.endLineNumberExclusive > range.startLineNumber;\n\t}\n\n\tgetUnion(other: LineRangeSet): LineRangeSet {\n\t\tif (this._normalizedRanges.length === 0) {\n\t\t\treturn other;\n\t\t}\n\t\tif (other._normalizedRanges.length === 0) {\n\t\t\treturn this;\n\t\t}\n\n\t\tconst result: LineRange[] = [];\n\t\tlet i1 = 0;\n\t\tlet i2 = 0;\n\t\tlet current: LineRange | null = null;\n\t\twhile (i1 < this._normalizedRanges.length || i2 < other._normalizedRanges.length) {\n\t\t\tlet next: LineRange | null = null;\n\t\t\tif (i1 < this._normalizedRanges.length && i2 < other._normalizedRanges.length) {\n\t\t\t\tconst lineRange1 = this._normalizedRanges[i1];\n\t\t\t\tconst lineRange2 = other._normalizedRanges[i2];\n\t\t\t\tif (lineRange1.startLineNumber < lineRange2.startLineNumber) {\n\t\t\t\t\tnext = lineRange1;\n\t\t\t\t\ti1++;\n\t\t\t\t} else {\n\t\t\t\t\tnext = lineRange2;\n\t\t\t\t\ti2++;\n\t\t\t\t}\n\t\t\t} else if (i1 < this._normalizedRanges.length) {\n\t\t\t\tnext = this._normalizedRanges[i1];\n\t\t\t\ti1++;\n\t\t\t} else {\n\t\t\t\tnext = other._normalizedRanges[i2];\n\t\t\t\ti2++;\n\t\t\t}\n\n\t\t\tif (current === null) {\n\t\t\t\tcurrent = next;\n\t\t\t} else {\n\t\t\t\tif (current.endLineNumberExclusive >= next.startLineNumber) {\n\t\t\t\t\t// merge\n\t\t\t\t\tcurrent = new LineRange(current.startLineNumber, Math.max(current.endLineNumberExclusive, next.endLineNumberExclusive));\n\t\t\t\t} else {\n\t\t\t\t\t// push\n\t\t\t\t\tresult.push(current);\n\t\t\t\t\tcurrent = next;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (current !== null) {\n\t\t\tresult.push(current);\n\t\t}\n\t\treturn new LineRangeSet(result);\n\t}\n\n\t/**\n\t * Subtracts all ranges in this set from `range` and returns the result.\n\t */\n\tsubtractFrom(range: LineRange): LineRangeSet {\n\t\t// idx of first element that touches range or that is after range\n\t\tconst joinRangeStartIdx = findFirstIdxMonotonousOrArrLen(this._normalizedRanges, r => r.endLineNumberExclusive >= range.startLineNumber);\n\t\t// idx of element after { last element that touches range or that is before range }\n\t\tconst joinRangeEndIdxExclusive = findLastIdxMonotonous(this._normalizedRanges, r => r.startLineNumber <= range.endLineNumberExclusive) + 1;\n\n\t\tif (joinRangeStartIdx === joinRangeEndIdxExclusive) {\n\t\t\treturn new LineRangeSet([range]);\n\t\t}\n\n\t\tconst result: LineRange[] = [];\n\t\tlet startLineNumber = range.startLineNumber;\n\t\tfor (let i = joinRangeStartIdx; i < joinRangeEndIdxExclusive; i++) {\n\t\t\tconst r = this._normalizedRanges[i];\n\t\t\tif (r.startLineNumber > startLineNumber) {\n\t\t\t\tresult.push(new LineRange(startLineNumber, r.startLineNumber));\n\t\t\t}\n\t\t\tstartLineNumber = r.endLineNumberExclusive;\n\t\t}\n\t\tif (startLineNumber < range.endLineNumberExclusive) {\n\t\t\tresult.push(new LineRange(startLineNumber, range.endLineNumberExclusive));\n\t\t}\n\n\t\treturn new LineRangeSet(result);\n\t}\n\n\ttoString() {\n\t\treturn this._normalizedRanges.map(r => r.toString()).join(', ');\n\t}\n\n\tgetIntersection(other: LineRangeSet): LineRangeSet {\n\t\tconst result: LineRange[] = [];\n\n\t\tlet i1 = 0;\n\t\tlet i2 = 0;\n\t\twhile (i1 < this._normalizedRanges.length && i2 < other._normalizedRanges.length) {\n\t\t\tconst r1 = this._normalizedRanges[i1];\n\t\t\tconst r2 = other._normalizedRanges[i2];\n\n\t\t\tconst i = r1.intersect(r2);\n\t\t\tif (i && !i.isEmpty) {\n\t\t\t\tresult.push(i);\n\t\t\t}\n\n\t\t\tif (r1.endLineNumberExclusive < r2.endLineNumberExclusive) {\n\t\t\t\ti1++;\n\t\t\t} else {\n\t\t\t\ti2++;\n\t\t\t}\n\t\t}\n\n\t\treturn new LineRangeSet(result);\n\t}\n\n\tgetWithDelta(value: number): LineRangeSet {\n\t\treturn new LineRangeSet(this._normalizedRanges.map(r => r.delta(value)));\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\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 { BugIndicatingError } from '../../../../base/common/errors.js';\nimport { OffsetRange } from './offsetRange.js';\nimport { Range } from '../range.js';\nimport { findFirstIdxMonotonousOrArrLen, findLastIdxMonotonous, findLastMonotonous } from '../../../../base/common/arraysFind.js';\nimport { Comparator, compareBy, numberComparator } from '../../../../base/common/arrays.js';\n\n/**\n * A range of lines (1-based).\n */\nexport class LineRange {\n\tpublic static ofLength(startLineNumber: number, length: number): LineRange {\n\t\treturn new LineRange(startLineNumber, startLineNumber + length);\n\t}\n\n\tpublic static fromRangeInclusive(range: Range): LineRange {\n\t\treturn new LineRange(range.startLineNumber, range.endLineNumber + 1);\n\t}\n\n\tpublic static readonly compareByStart: Comparator<LineRange> = compareBy(l => l.startLineNumber, numberComparator);\n\n\t/**\n\t * @param lineRanges An array of arrays of of sorted line ranges.\n\t */\n\tpublic static joinMany(lineRanges: readonly (readonly LineRange[])[]): readonly LineRange[] {\n\t\tif (lineRanges.length === 0) {\n\t\t\treturn [];\n\t\t}\n\t\tlet result = new LineRangeSet(lineRanges[0].slice());\n\t\tfor (let i = 1; i < lineRanges.length; i++) {\n\t\t\tresult = result.getUnion(new LineRangeSet(lineRanges[i].slice()));\n\t\t}\n\t\treturn result.ranges;\n\t}\n\n\tpublic static join(lineRanges: LineRange[]): LineRange {\n\t\tif (lineRanges.length === 0) {\n\t\t\tthrow new BugIndicatingError('lineRanges cannot be empty');\n\t\t}\n\t\tlet startLineNumber = lineRanges[0].startLineNumber;\n\t\tlet endLineNumberExclusive = lineRanges[0].endLineNumberExclusive;\n\t\tfor (let i = 1; i < lineRanges.length; i++) {\n\t\t\tstartLineNumber = Math.min(startLineNumber, lineRanges[i].startLineNumber);\n\t\t\tendLineNumberExclusive = Math.max(endLineNumberExclusive, lineRanges[i].endLineNumberExclusive);\n\t\t}\n\t\treturn new LineRange(startLineNumber, endLineNumberExclusive);\n\t}\n\n\t/**\n\t * @internal\n\t */\n\tpublic static deserialize(lineRange: ISerializedLineRange): LineRange {\n\t\treturn new LineRange(lineRange[0], lineRange[1]);\n\t}\n\n\t/**\n\t * The start line number.\n\t */\n\tpublic readonly startLineNumber: number;\n\n\t/**\n\t * The end line number (exclusive).\n\t */\n\tpublic readonly endLineNumberExclusive: number;\n\n\tconstructor(\n\t\tstartLineNumber: number,\n\t\tendLineNumberExclusive: number,\n\t) {\n\t\tif (startLineNumber > endLineNumberExclusive) {\n\t\t\tthrow new BugIndicatingError(`startLineNumber ${startLineNumber} cannot be after endLineNumberExclusive ${endLineNumberExclusive}`);\n\t\t}\n\t\tthis.startLineNumber = startLineNumber;\n\t\tthis.endLineNumberExclusive = endLineNumberExclusive;\n\t}\n\n\t/**\n\t * Indicates if this line range contains the given line number.\n\t */\n\tpublic contains(lineNumber: number): boolean {\n\t\treturn this.startLineNumber <= lineNumber && lineNumber < this.endLineNumberExclusive;\n\t}\n\n\t/**\n\t * Indicates if this line range is empty.\n\t */\n\tget isEmpty(): boolean {\n\t\treturn this.startLineNumber === this.endLineNumberExclusive;\n\t}\n\n\t/**\n\t * Moves this line range by the given offset of line numbers.\n\t */\n\tpublic delta(offset: number): LineRange {\n\t\treturn new LineRange(this.startLineNumber + offset, this.endLineNumberExclusive + offset);\n\t}\n\n\tpublic deltaLength(offset: number): LineRange {\n\t\treturn new LineRange(this.startLineNumber, this.endLineNumberExclusive + offset);\n\t}\n\n\t/**\n\t * The number of lines this line range spans.\n\t */\n\tpublic get length(): number {\n\t\treturn this.endLineNumberExclusive - this.startLineNumber;\n\t}\n\n\t/**\n\t * Creates a line range that combines this and the given line range.\n\t */\n\tpublic join(other: LineRange): LineRange {\n\t\treturn new LineRange(\n\t\t\tMath.min(this.startLineNumber, other.startLineNumber),\n\t\t\tMath.max(this.endLineNumberExclusive, other.endLineNumberExclusive)\n\t\t);\n\t}\n\n\tpublic toString(): string {\n\t\treturn `[${this.startLineNumber},${this.endLineNumberExclusive})`;\n\t}\n\n\t/**\n\t * The resulting range is empty if the ranges do not intersect, but touch.\n\t * If the ranges don't even touch, the result is undefined.\n\t */\n\tpublic intersect(other: LineRange): LineRange | undefined {\n\t\tconst startLineNumber = Math.max(this.startLineNumber, other.startLineNumber);\n\t\tconst endLineNumberExclusive = Math.min(this.endLineNumberExclusive, other.endLineNumberExclusive);\n\t\tif (startLineNumber <= endLineNumberExclusive) {\n\t\t\treturn new LineRange(startLineNumber, endLineNumberExclusive);\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tpublic intersectsStrict(other: LineRange): boolean {\n\t\treturn this.startLineNumber < other.endLineNumberExclusive && other.startLineNumber < this.endLineNumberExclusive;\n\t}\n\n\tpublic intersectsOrTouches(other: LineRange): boolean {\n\t\treturn this.startLineNumber <= other.endLineNumberExclusive && other.startLineNumber <= this.endLineNumberExclusive;\n\t}\n\n\tpublic equals(b: LineRange): boolean {\n\t\treturn this.startLineNumber === b.startLineNumber && this.endLineNumberExclusive === b.endLineNumberExclusive;\n\t}\n\n\tpublic toInclusiveRange(): Range | null {\n\t\tif (this.isEmpty) {\n\t\t\treturn null;\n\t\t}\n\t\treturn new Range(this.startLineNumber, 1, this.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER);\n\t}\n\n\t/**\n\t * @deprecated Using this function is discouraged because it might lead to bugs: The end position is not guaranteed to be a valid position!\n\t*/\n\tpublic toExclusiveRange(): Range {\n\t\treturn new Range(this.startLineNumber, 1, this.endLineNumberExclusive, 1);\n\t}\n\n\tpublic mapToLineArray<T>(f: (lineNumber: number) => T): T[] {\n\t\tconst result: T[] = [];\n\t\tfor (let lineNumber = this.startLineNumber; lineNumber < this.endLineNumberExclusive; lineNumber++) {\n\t\t\tresult.push(f(lineNumber));\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic forEach(f: (lineNumber: number) => void): void {\n\t\tfor (let lineNumber = this.startLineNumber; lineNumber < this.endLineNumberExclusive; lineNumber++) {\n\t\t\tf(lineNumber);\n\t\t}\n\t}\n\n\t/**\n\t * @internal\n\t */\n\tpublic serialize(): ISerializedLineRange {\n\t\treturn [this.startLineNumber, this.endLineNumberExclusive];\n\t}\n\n\t/**\n\t * Converts this 1-based line range to a 0-based offset range (subtracts 1!).\n\t * @internal\n\t */\n\tpublic toOffsetRange(): OffsetRange {\n\t\treturn new OffsetRange(this.startLineNumber - 1, this.endLineNumberExclusive - 1);\n\t}\n\n\tpublic addMargin(marginTop: number, marginBottom: number): LineRange {\n\t\treturn new LineRange(\n\t\t\tthis.startLineNumber - marginTop,\n\t\t\tthis.endLineNumberExclusive + marginBottom\n\t\t);\n\t}\n}\n\nexport type ISerializedLineRange = [startLineNumber: number, endLineNumberExclusive: number];\n\n\nexport class LineRangeSet {\n\tconstructor(\n\t\t/**\n\t\t * Sorted by start line number.\n\t\t * No two line ranges are touching or intersecting.\n\t\t */\n\t\tprivate readonly _normalizedRanges: LineRange[] = []\n\t) {\n\t}\n\n\tget ranges(): readonly LineRange[] {\n\t\treturn this._normalizedRanges;\n\t}\n\n\taddRange(range: LineRange): void {\n\t\tif (range.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Idea: Find joinRange such that:\n\t\t// replaceRange = _normalizedRanges.replaceRange(joinRange, range.joinAll(joinRange.map(idx => this._normalizedRanges[idx])))\n\n\t\t// idx of first element that touches range or that is after range\n\t\tconst joinRangeStartIdx = findFirstIdxMonotonousOrArrLen(this._normalizedRanges, r => r.endLineNumberExclusive >= range.startLineNumber);\n\t\t// idx of element after { last element that touches range or that is before range }\n\t\tconst joinRangeEndIdxExclusive = findLastIdxMonotonous(this._normalizedRanges, r => r.startLineNumber <= range.endLineNumberExclusive) + 1;\n\n\t\tif (joinRangeStartIdx === joinRangeEndIdxExclusive) {\n\t\t\t// If there is no element that touches range, then joinRangeStartIdx === joinRangeEndIdxExclusive and that value is the index of the element after range\n\t\t\tthis._normalizedRanges.splice(joinRangeStartIdx, 0, range);\n\t\t} else if (joinRangeStartIdx === joinRangeEndIdxExclusive - 1) {\n\t\t\t// Else, there is an element that touches range and in this case it is both the first and last element. Thus we can replace it\n\t\t\tconst joinRange = this._normalizedRanges[joinRangeStartIdx];\n\t\t\tthis._normalizedRanges[joinRangeStartIdx] = joinRange.join(range);\n\t\t} else {\n\t\t\t// First and last element are different - we need to replace the entire range\n\t\t\tconst joinRange = this._normalizedRanges[joinRangeStartIdx].join(this._normalizedRanges[joinRangeEndIdxExclusive - 1]).join(range);\n\t\t\tthis._normalizedRanges.splice(joinRangeStartIdx, joinRangeEndIdxExclusive - joinRangeStartIdx, joinRange);\n\t\t}\n\t}\n\n\tcontains(lineNumber: number): boolean {\n\t\tconst rangeThatStartsBeforeEnd = findLastMonotonous(this._normalizedRanges, r => r.startLineNumber <= lineNumber);\n\t\treturn !!rangeThatStartsBeforeEnd && rangeThatStartsBeforeEnd.endLineNumberExclusive > lineNumber;\n\t}\n\n\tintersects(range: LineRange): boolean {\n\t\tconst rangeThatStartsBeforeEnd = findLastMonotonous(this._normalizedRanges, r => r.startLineNumber < range.endLineNumberExclusive);\n\t\treturn !!rangeThatStartsBeforeEnd && rangeThatStartsBeforeEnd.endLineNumberExclusive > range.startLineNumber;\n\t}\n\n\tgetUnion(other: LineRangeSet): LineRangeSet {\n\t\tif (this._normalizedRanges.length === 0) {\n\t\t\treturn other;\n\t\t}\n\t\tif (other._normalizedRanges.length === 0) {\n\t\t\treturn this;\n\t\t}\n\n\t\tconst result: LineRange[] = [];\n\t\tlet i1 = 0;\n\t\tlet i2 = 0;\n\t\tlet current: LineRange | null = null;\n\t\twhile (i1 < this._normalizedRanges.length || i2 < other._normalizedRanges.length) {\n\t\t\tlet next: LineRange | null = null;\n\t\t\tif (i1 < this._normalizedRanges.length && i2 < other._normalizedRanges.length) {\n\t\t\t\tconst lineRange1 = this._normalizedRanges[i1];\n\t\t\t\tconst lineRange2 = other._normalizedRanges[i2];\n\t\t\t\tif (lineRange1.startLineNumber < lineRange2.startLineNumber) {\n\t\t\t\t\tnext = lineRange1;\n\t\t\t\t\ti1++;\n\t\t\t\t} else {\n\t\t\t\t\tnext = lineRange2;\n\t\t\t\t\ti2++;\n\t\t\t\t}\n\t\t\t} else if (i1 < this._normalizedRanges.length) {\n\t\t\t\tnext = this._normalizedRanges[i1];\n\t\t\t\ti1++;\n\t\t\t} else {\n\t\t\t\tnext = other._normalizedRanges[i2];\n\t\t\t\ti2++;\n\t\t\t}\n\n\t\t\tif (current === null) {\n\t\t\t\tcurrent = next;\n\t\t\t} else {\n\t\t\t\tif (current.endLineNumberExclusive >= next.startLineNumber) {\n\t\t\t\t\t// merge\n\t\t\t\t\tcurrent = new LineRange(current.startLineNumber, Math.max(current.endLineNumberExclusive, next.endLineNumberExclusive));\n\t\t\t\t} else {\n\t\t\t\t\t// push\n\t\t\t\t\tresult.push(current);\n\t\t\t\t\tcurrent = next;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (current !== null) {\n\t\t\tresult.push(current);\n\t\t}\n\t\treturn new LineRangeSet(result);\n\t}\n\n\t/**\n\t * Subtracts all ranges in this set from `range` and returns the result.\n\t */\n\tsubtractFrom(range: LineRange): LineRangeSet {\n\t\t// idx of first element that touches range or that is after range\n\t\tconst joinRangeStartIdx = findFirstIdxMonotonousOrArrLen(this._normalizedRanges, r => r.endLineNumberExclusive >= range.startLineNumber);\n\t\t// idx of element after { last element that touches range or that is before range }\n\t\tconst joinRangeEndIdxExclusive = findLastIdxMonotonous(this._normalizedRanges, r => r.startLineNumber <= range.endLineNumberExclusive) + 1;\n\n\t\tif (joinRangeStartIdx === joinRangeEndIdxExclusive) {\n\t\t\treturn new LineRangeSet([range]);\n\t\t}\n\n\t\tconst result: LineRange[] = [];\n\t\tlet startLineNumber = range.startLineNumber;\n\t\tfor (let i = joinRangeStartIdx; i < joinRangeEndIdxExclusive; i++) {\n\t\t\tconst r = this._normalizedRanges[i];\n\t\t\tif (r.startLineNumber > startLineNumber) {\n\t\t\t\tresult.push(new LineRange(startLineNumber, r.startLineNumber));\n\t\t\t}\n\t\t\tstartLineNumber = r.endLineNumberExclusive;\n\t\t}\n\t\tif (startLineNumber < range.endLineNumberExclusive) {\n\t\t\tresult.push(new LineRange(startLineNumber, range.endLineNumberExclusive));\n\t\t}\n\n\t\treturn new LineRangeSet(result);\n\t}\n\n\ttoString() {\n\t\treturn this._normalizedRanges.map(r => r.toString()).join(', ');\n\t}\n\n\tgetIntersection(other: LineRangeSet): LineRangeSet {\n\t\tconst result: LineRange[] = [];\n\n\t\tlet i1 = 0;\n\t\tlet i2 = 0;\n\t\twhile (i1 < this._normalizedRanges.length && i2 < other._normalizedRanges.length) {\n\t\t\tconst r1 = this._normalizedRanges[i1];\n\t\t\tconst r2 = other._normalizedRanges[i2];\n\n\t\t\tconst i = r1.intersect(r2);\n\t\t\tif (i && !i.isEmpty) {\n\t\t\t\tresult.push(i);\n\t\t\t}\n\n\t\t\tif (r1.endLineNumberExclusive < r2.endLineNumberExclusive) {\n\t\t\t\ti1++;\n\t\t\t} else {\n\t\t\t\ti2++;\n\t\t\t}\n\t\t}\n\n\t\treturn new LineRangeSet(result);\n\t}\n\n\tgetWithDelta(value: number): LineRangeSet {\n\t\treturn new LineRangeSet(this._normalizedRanges.map(r => r.delta(value)));\n\t}\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/common/core/ranges/lineRange.ts","vs/editor/common/core/ranges/lineRange.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,8BAA8B,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAClI,OAAO,EAAc,SAAS,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAE5F;;GAEG;AACH,MAAM,OAAO,SAAS;IACd,MAAM,CAAC,QAAQ,CAAC,eAAuB,EAAE,MAAc;QAC7D,OAAO,IAAI,SAAS,CAAC,eAAe,EAAE,eAAe,GAAG,MAAM,CAAC,CAAC;IACjE,CAAC;IAEM,MAAM,CAAC,SAAS,CAAC,KAAY;QACnC,OAAO,IAAI,SAAS,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAClE,CAAC;IAEM,MAAM,CAAC,kBAAkB,CAAC,KAAY;QAC5C,OAAO,IAAI,SAAS,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,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,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1E,CAAC;CACD","file":"lineRange.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 { BugIndicatingError } from '../../../../base/common/errors.js';\nimport { OffsetRange } from './offsetRange.js';\nimport { Range } from '../range.js';\nimport { findFirstIdxMonotonousOrArrLen, findLastIdxMonotonous, findLastMonotonous } from '../../../../base/common/arraysFind.js';\nimport { Comparator, compareBy, numberComparator } from '../../../../base/common/arrays.js';\n\n/**\n * A range of lines (1-based).\n */\nexport class LineRange {\n\tpublic static ofLength(startLineNumber: number, length: number): LineRange {\n\t\treturn new LineRange(startLineNumber, startLineNumber + length);\n\t}\n\n\tpublic static fromRange(range: Range): LineRange {\n\t\treturn new LineRange(range.startLineNumber, range.endLineNumber);\n\t}\n\n\tpublic static fromRangeInclusive(range: Range): LineRange {\n\t\treturn new LineRange(range.startLineNumber, range.endLineNumber + 1);\n\t}\n\n\tpublic static readonly compareByStart: Comparator<LineRange> = compareBy(l => l.startLineNumber, numberComparator);\n\n\t/**\n\t * @param lineRanges An array of arrays of of sorted line ranges.\n\t */\n\tpublic static joinMany(lineRanges: readonly (readonly LineRange[])[]): readonly LineRange[] {\n\t\tif (lineRanges.length === 0) {\n\t\t\treturn [];\n\t\t}\n\t\tlet result = new LineRangeSet(lineRanges[0].slice());\n\t\tfor (let i = 1; i < lineRanges.length; i++) {\n\t\t\tresult = result.getUnion(new LineRangeSet(lineRanges[i].slice()));\n\t\t}\n\t\treturn result.ranges;\n\t}\n\n\tpublic static join(lineRanges: LineRange[]): LineRange {\n\t\tif (lineRanges.length === 0) {\n\t\t\tthrow new BugIndicatingError('lineRanges cannot be empty');\n\t\t}\n\t\tlet startLineNumber = lineRanges[0].startLineNumber;\n\t\tlet endLineNumberExclusive = lineRanges[0].endLineNumberExclusive;\n\t\tfor (let i = 1; i < lineRanges.length; i++) {\n\t\t\tstartLineNumber = Math.min(startLineNumber, lineRanges[i].startLineNumber);\n\t\t\tendLineNumberExclusive = Math.max(endLineNumberExclusive, lineRanges[i].endLineNumberExclusive);\n\t\t}\n\t\treturn new LineRange(startLineNumber, endLineNumberExclusive);\n\t}\n\n\t/**\n\t * @internal\n\t */\n\tpublic static deserialize(lineRange: ISerializedLineRange): LineRange {\n\t\treturn new LineRange(lineRange[0], lineRange[1]);\n\t}\n\n\t/**\n\t * The start line number.\n\t */\n\tpublic readonly startLineNumber: number;\n\n\t/**\n\t * The end line number (exclusive).\n\t */\n\tpublic readonly endLineNumberExclusive: number;\n\n\tconstructor(\n\t\tstartLineNumber: number,\n\t\tendLineNumberExclusive: number,\n\t) {\n\t\tif (startLineNumber > endLineNumberExclusive) {\n\t\t\tthrow new BugIndicatingError(`startLineNumber ${startLineNumber} cannot be after endLineNumberExclusive ${endLineNumberExclusive}`);\n\t\t}\n\t\tthis.startLineNumber = startLineNumber;\n\t\tthis.endLineNumberExclusive = endLineNumberExclusive;\n\t}\n\n\t/**\n\t * Indicates if this line range contains the given line number.\n\t */\n\tpublic contains(lineNumber: number): boolean {\n\t\treturn this.startLineNumber <= lineNumber && lineNumber < this.endLineNumberExclusive;\n\t}\n\n\t/**\n\t * Indicates if this line range is empty.\n\t */\n\tget isEmpty(): boolean {\n\t\treturn this.startLineNumber === this.endLineNumberExclusive;\n\t}\n\n\t/**\n\t * Moves this line range by the given offset of line numbers.\n\t */\n\tpublic delta(offset: number): LineRange {\n\t\treturn new LineRange(this.startLineNumber + offset, this.endLineNumberExclusive + offset);\n\t}\n\n\tpublic deltaLength(offset: number): LineRange {\n\t\treturn new LineRange(this.startLineNumber, this.endLineNumberExclusive + offset);\n\t}\n\n\t/**\n\t * The number of lines this line range spans.\n\t */\n\tpublic get length(): number {\n\t\treturn this.endLineNumberExclusive - this.startLineNumber;\n\t}\n\n\t/**\n\t * Creates a line range that combines this and the given line range.\n\t */\n\tpublic join(other: LineRange): LineRange {\n\t\treturn new LineRange(\n\t\t\tMath.min(this.startLineNumber, other.startLineNumber),\n\t\t\tMath.max(this.endLineNumberExclusive, other.endLineNumberExclusive)\n\t\t);\n\t}\n\n\tpublic toString(): string {\n\t\treturn `[${this.startLineNumber},${this.endLineNumberExclusive})`;\n\t}\n\n\t/**\n\t * The resulting range is empty if the ranges do not intersect, but touch.\n\t * If the ranges don't even touch, the result is undefined.\n\t */\n\tpublic intersect(other: LineRange): LineRange | undefined {\n\t\tconst startLineNumber = Math.max(this.startLineNumber, other.startLineNumber);\n\t\tconst endLineNumberExclusive = Math.min(this.endLineNumberExclusive, other.endLineNumberExclusive);\n\t\tif (startLineNumber <= endLineNumberExclusive) {\n\t\t\treturn new LineRange(startLineNumber, endLineNumberExclusive);\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tpublic intersectsStrict(other: LineRange): boolean {\n\t\treturn this.startLineNumber < other.endLineNumberExclusive && other.startLineNumber < this.endLineNumberExclusive;\n\t}\n\n\tpublic intersectsOrTouches(other: LineRange): boolean {\n\t\treturn this.startLineNumber <= other.endLineNumberExclusive && other.startLineNumber <= this.endLineNumberExclusive;\n\t}\n\n\tpublic equals(b: LineRange): boolean {\n\t\treturn this.startLineNumber === b.startLineNumber && this.endLineNumberExclusive === b.endLineNumberExclusive;\n\t}\n\n\tpublic toInclusiveRange(): Range | null {\n\t\tif (this.isEmpty) {\n\t\t\treturn null;\n\t\t}\n\t\treturn new Range(this.startLineNumber, 1, this.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER);\n\t}\n\n\t/**\n\t * @deprecated Using this function is discouraged because it might lead to bugs: The end position is not guaranteed to be a valid position!\n\t*/\n\tpublic toExclusiveRange(): Range {\n\t\treturn new Range(this.startLineNumber, 1, this.endLineNumberExclusive, 1);\n\t}\n\n\tpublic mapToLineArray<T>(f: (lineNumber: number) => T): T[] {\n\t\tconst result: T[] = [];\n\t\tfor (let lineNumber = this.startLineNumber; lineNumber < this.endLineNumberExclusive; lineNumber++) {\n\t\t\tresult.push(f(lineNumber));\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic forEach(f: (lineNumber: number) => void): void {\n\t\tfor (let lineNumber = this.startLineNumber; lineNumber < this.endLineNumberExclusive; lineNumber++) {\n\t\t\tf(lineNumber);\n\t\t}\n\t}\n\n\t/**\n\t * @internal\n\t */\n\tpublic serialize(): ISerializedLineRange {\n\t\treturn [this.startLineNumber, this.endLineNumberExclusive];\n\t}\n\n\t/**\n\t * Converts this 1-based line range to a 0-based offset range (subtracts 1!).\n\t * @internal\n\t */\n\tpublic toOffsetRange(): OffsetRange {\n\t\treturn new OffsetRange(this.startLineNumber - 1, this.endLineNumberExclusive - 1);\n\t}\n\n\tpublic addMargin(marginTop: number, marginBottom: number): LineRange {\n\t\treturn new LineRange(\n\t\t\tthis.startLineNumber - marginTop,\n\t\t\tthis.endLineNumberExclusive + marginBottom\n\t\t);\n\t}\n}\n\nexport type ISerializedLineRange = [startLineNumber: number, endLineNumberExclusive: number];\n\n\nexport class LineRangeSet {\n\tconstructor(\n\t\t/**\n\t\t * Sorted by start line number.\n\t\t * No two line ranges are touching or intersecting.\n\t\t */\n\t\tprivate readonly _normalizedRanges: LineRange[] = []\n\t) {\n\t}\n\n\tget ranges(): readonly LineRange[] {\n\t\treturn this._normalizedRanges;\n\t}\n\n\taddRange(range: LineRange): void {\n\t\tif (range.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Idea: Find joinRange such that:\n\t\t// replaceRange = _normalizedRanges.replaceRange(joinRange, range.joinAll(joinRange.map(idx => this._normalizedRanges[idx])))\n\n\t\t// idx of first element that touches range or that is after range\n\t\tconst joinRangeStartIdx = findFirstIdxMonotonousOrArrLen(this._normalizedRanges, r => r.endLineNumberExclusive >= range.startLineNumber);\n\t\t// idx of element after { last element that touches range or that is before range }\n\t\tconst joinRangeEndIdxExclusive = findLastIdxMonotonous(this._normalizedRanges, r => r.startLineNumber <= range.endLineNumberExclusive) + 1;\n\n\t\tif (joinRangeStartIdx === joinRangeEndIdxExclusive) {\n\t\t\t// If there is no element that touches range, then joinRangeStartIdx === joinRangeEndIdxExclusive and that value is the index of the element after range\n\t\t\tthis._normalizedRanges.splice(joinRangeStartIdx, 0, range);\n\t\t} else if (joinRangeStartIdx === joinRangeEndIdxExclusive - 1) {\n\t\t\t// Else, there is an element that touches range and in this case it is both the first and last element. Thus we can replace it\n\t\t\tconst joinRange = this._normalizedRanges[joinRangeStartIdx];\n\t\t\tthis._normalizedRanges[joinRangeStartIdx] = joinRange.join(range);\n\t\t} else {\n\t\t\t// First and last element are different - we need to replace the entire range\n\t\t\tconst joinRange = this._normalizedRanges[joinRangeStartIdx].join(this._normalizedRanges[joinRangeEndIdxExclusive - 1]).join(range);\n\t\t\tthis._normalizedRanges.splice(joinRangeStartIdx, joinRangeEndIdxExclusive - joinRangeStartIdx, joinRange);\n\t\t}\n\t}\n\n\tcontains(lineNumber: number): boolean {\n\t\tconst rangeThatStartsBeforeEnd = findLastMonotonous(this._normalizedRanges, r => r.startLineNumber <= lineNumber);\n\t\treturn !!rangeThatStartsBeforeEnd && rangeThatStartsBeforeEnd.endLineNumberExclusive > lineNumber;\n\t}\n\n\tintersects(range: LineRange): boolean {\n\t\tconst rangeThatStartsBeforeEnd = findLastMonotonous(this._normalizedRanges, r => r.startLineNumber < range.endLineNumberExclusive);\n\t\treturn !!rangeThatStartsBeforeEnd && rangeThatStartsBeforeEnd.endLineNumberExclusive > range.startLineNumber;\n\t}\n\n\tgetUnion(other: LineRangeSet): LineRangeSet {\n\t\tif (this._normalizedRanges.length === 0) {\n\t\t\treturn other;\n\t\t}\n\t\tif (other._normalizedRanges.length === 0) {\n\t\t\treturn this;\n\t\t}\n\n\t\tconst result: LineRange[] = [];\n\t\tlet i1 = 0;\n\t\tlet i2 = 0;\n\t\tlet current: LineRange | null = null;\n\t\twhile (i1 < this._normalizedRanges.length || i2 < other._normalizedRanges.length) {\n\t\t\tlet next: LineRange | null = null;\n\t\t\tif (i1 < this._normalizedRanges.length && i2 < other._normalizedRanges.length) {\n\t\t\t\tconst lineRange1 = this._normalizedRanges[i1];\n\t\t\t\tconst lineRange2 = other._normalizedRanges[i2];\n\t\t\t\tif (lineRange1.startLineNumber < lineRange2.startLineNumber) {\n\t\t\t\t\tnext = lineRange1;\n\t\t\t\t\ti1++;\n\t\t\t\t} else {\n\t\t\t\t\tnext = lineRange2;\n\t\t\t\t\ti2++;\n\t\t\t\t}\n\t\t\t} else if (i1 < this._normalizedRanges.length) {\n\t\t\t\tnext = this._normalizedRanges[i1];\n\t\t\t\ti1++;\n\t\t\t} else {\n\t\t\t\tnext = other._normalizedRanges[i2];\n\t\t\t\ti2++;\n\t\t\t}\n\n\t\t\tif (current === null) {\n\t\t\t\tcurrent = next;\n\t\t\t} else {\n\t\t\t\tif (current.endLineNumberExclusive >= next.startLineNumber) {\n\t\t\t\t\t// merge\n\t\t\t\t\tcurrent = new LineRange(current.startLineNumber, Math.max(current.endLineNumberExclusive, next.endLineNumberExclusive));\n\t\t\t\t} else {\n\t\t\t\t\t// push\n\t\t\t\t\tresult.push(current);\n\t\t\t\t\tcurrent = next;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (current !== null) {\n\t\t\tresult.push(current);\n\t\t}\n\t\treturn new LineRangeSet(result);\n\t}\n\n\t/**\n\t * Subtracts all ranges in this set from `range` and returns the result.\n\t */\n\tsubtractFrom(range: LineRange): LineRangeSet {\n\t\t// idx of first element that touches range or that is after range\n\t\tconst joinRangeStartIdx = findFirstIdxMonotonousOrArrLen(this._normalizedRanges, r => r.endLineNumberExclusive >= range.startLineNumber);\n\t\t// idx of element after { last element that touches range or that is before range }\n\t\tconst joinRangeEndIdxExclusive = findLastIdxMonotonous(this._normalizedRanges, r => r.startLineNumber <= range.endLineNumberExclusive) + 1;\n\n\t\tif (joinRangeStartIdx === joinRangeEndIdxExclusive) {\n\t\t\treturn new LineRangeSet([range]);\n\t\t}\n\n\t\tconst result: LineRange[] = [];\n\t\tlet startLineNumber = range.startLineNumber;\n\t\tfor (let i = joinRangeStartIdx; i < joinRangeEndIdxExclusive; i++) {\n\t\t\tconst r = this._normalizedRanges[i];\n\t\t\tif (r.startLineNumber > startLineNumber) {\n\t\t\t\tresult.push(new LineRange(startLineNumber, r.startLineNumber));\n\t\t\t}\n\t\t\tstartLineNumber = r.endLineNumberExclusive;\n\t\t}\n\t\tif (startLineNumber < range.endLineNumberExclusive) {\n\t\t\tresult.push(new LineRange(startLineNumber, range.endLineNumberExclusive));\n\t\t}\n\n\t\treturn new LineRangeSet(result);\n\t}\n\n\ttoString() {\n\t\treturn this._normalizedRanges.map(r => r.toString()).join(', ');\n\t}\n\n\tgetIntersection(other: LineRangeSet): LineRangeSet {\n\t\tconst result: LineRange[] = [];\n\n\t\tlet i1 = 0;\n\t\tlet i2 = 0;\n\t\twhile (i1 < this._normalizedRanges.length && i2 < other._normalizedRanges.length) {\n\t\t\tconst r1 = this._normalizedRanges[i1];\n\t\t\tconst r2 = other._normalizedRanges[i2];\n\n\t\t\tconst i = r1.intersect(r2);\n\t\t\tif (i && !i.isEmpty) {\n\t\t\t\tresult.push(i);\n\t\t\t}\n\n\t\t\tif (r1.endLineNumberExclusive < r2.endLineNumberExclusive) {\n\t\t\t\ti1++;\n\t\t\t} else {\n\t\t\t\ti2++;\n\t\t\t}\n\t\t}\n\n\t\treturn new LineRangeSet(result);\n\t}\n\n\tgetWithDelta(value: number): LineRangeSet {\n\t\treturn new LineRangeSet(this._normalizedRanges.map(r => r.delta(value)));\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\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 { BugIndicatingError } from '../../../../base/common/errors.js';\nimport { OffsetRange } from './offsetRange.js';\nimport { Range } from '../range.js';\nimport { findFirstIdxMonotonousOrArrLen, findLastIdxMonotonous, findLastMonotonous } from '../../../../base/common/arraysFind.js';\nimport { Comparator, compareBy, numberComparator } from '../../../../base/common/arrays.js';\n\n/**\n * A range of lines (1-based).\n */\nexport class LineRange {\n\tpublic static ofLength(startLineNumber: number, length: number): LineRange {\n\t\treturn new LineRange(startLineNumber, startLineNumber + length);\n\t}\n\n\tpublic static fromRange(range: Range): LineRange {\n\t\treturn new LineRange(range.startLineNumber, range.endLineNumber);\n\t}\n\n\tpublic static fromRangeInclusive(range: Range): LineRange {\n\t\treturn new LineRange(range.startLineNumber, range.endLineNumber + 1);\n\t}\n\n\tpublic static readonly compareByStart: Comparator<LineRange> = compareBy(l => l.startLineNumber, numberComparator);\n\n\t/**\n\t * @param lineRanges An array of arrays of of sorted line ranges.\n\t */\n\tpublic static joinMany(lineRanges: readonly (readonly LineRange[])[]): readonly LineRange[] {\n\t\tif (lineRanges.length === 0) {\n\t\t\treturn [];\n\t\t}\n\t\tlet result = new LineRangeSet(lineRanges[0].slice());\n\t\tfor (let i = 1; i < lineRanges.length; i++) {\n\t\t\tresult = result.getUnion(new LineRangeSet(lineRanges[i].slice()));\n\t\t}\n\t\treturn result.ranges;\n\t}\n\n\tpublic static join(lineRanges: LineRange[]): LineRange {\n\t\tif (lineRanges.length === 0) {\n\t\t\tthrow new BugIndicatingError('lineRanges cannot be empty');\n\t\t}\n\t\tlet startLineNumber = lineRanges[0].startLineNumber;\n\t\tlet endLineNumberExclusive = lineRanges[0].endLineNumberExclusive;\n\t\tfor (let i = 1; i < lineRanges.length; i++) {\n\t\t\tstartLineNumber = Math.min(startLineNumber, lineRanges[i].startLineNumber);\n\t\t\tendLineNumberExclusive = Math.max(endLineNumberExclusive, lineRanges[i].endLineNumberExclusive);\n\t\t}\n\t\treturn new LineRange(startLineNumber, endLineNumberExclusive);\n\t}\n\n\t/**\n\t * @internal\n\t */\n\tpublic static deserialize(lineRange: ISerializedLineRange): LineRange {\n\t\treturn new LineRange(lineRange[0], lineRange[1]);\n\t}\n\n\t/**\n\t * The start line number.\n\t */\n\tpublic readonly startLineNumber: number;\n\n\t/**\n\t * The end line number (exclusive).\n\t */\n\tpublic readonly endLineNumberExclusive: number;\n\n\tconstructor(\n\t\tstartLineNumber: number,\n\t\tendLineNumberExclusive: number,\n\t) {\n\t\tif (startLineNumber > endLineNumberExclusive) {\n\t\t\tthrow new BugIndicatingError(`startLineNumber ${startLineNumber} cannot be after endLineNumberExclusive ${endLineNumberExclusive}`);\n\t\t}\n\t\tthis.startLineNumber = startLineNumber;\n\t\tthis.endLineNumberExclusive = endLineNumberExclusive;\n\t}\n\n\t/**\n\t * Indicates if this line range contains the given line number.\n\t */\n\tpublic contains(lineNumber: number): boolean {\n\t\treturn this.startLineNumber <= lineNumber && lineNumber < this.endLineNumberExclusive;\n\t}\n\n\t/**\n\t * Indicates if this line range is empty.\n\t */\n\tget isEmpty(): boolean {\n\t\treturn this.startLineNumber === this.endLineNumberExclusive;\n\t}\n\n\t/**\n\t * Moves this line range by the given offset of line numbers.\n\t */\n\tpublic delta(offset: number): LineRange {\n\t\treturn new LineRange(this.startLineNumber + offset, this.endLineNumberExclusive + offset);\n\t}\n\n\tpublic deltaLength(offset: number): LineRange {\n\t\treturn new LineRange(this.startLineNumber, this.endLineNumberExclusive + offset);\n\t}\n\n\t/**\n\t * The number of lines this line range spans.\n\t */\n\tpublic get length(): number {\n\t\treturn this.endLineNumberExclusive - this.startLineNumber;\n\t}\n\n\t/**\n\t * Creates a line range that combines this and the given line range.\n\t */\n\tpublic join(other: LineRange): LineRange {\n\t\treturn new LineRange(\n\t\t\tMath.min(this.startLineNumber, other.startLineNumber),\n\t\t\tMath.max(this.endLineNumberExclusive, other.endLineNumberExclusive)\n\t\t);\n\t}\n\n\tpublic toString(): string {\n\t\treturn `[${this.startLineNumber},${this.endLineNumberExclusive})`;\n\t}\n\n\t/**\n\t * The resulting range is empty if the ranges do not intersect, but touch.\n\t * If the ranges don't even touch, the result is undefined.\n\t */\n\tpublic intersect(other: LineRange): LineRange | undefined {\n\t\tconst startLineNumber = Math.max(this.startLineNumber, other.startLineNumber);\n\t\tconst endLineNumberExclusive = Math.min(this.endLineNumberExclusive, other.endLineNumberExclusive);\n\t\tif (startLineNumber <= endLineNumberExclusive) {\n\t\t\treturn new LineRange(startLineNumber, endLineNumberExclusive);\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tpublic intersectsStrict(other: LineRange): boolean {\n\t\treturn this.startLineNumber < other.endLineNumberExclusive && other.startLineNumber < this.endLineNumberExclusive;\n\t}\n\n\tpublic intersectsOrTouches(other: LineRange): boolean {\n\t\treturn this.startLineNumber <= other.endLineNumberExclusive && other.startLineNumber <= this.endLineNumberExclusive;\n\t}\n\n\tpublic equals(b: LineRange): boolean {\n\t\treturn this.startLineNumber === b.startLineNumber && this.endLineNumberExclusive === b.endLineNumberExclusive;\n\t}\n\n\tpublic toInclusiveRange(): Range | null {\n\t\tif (this.isEmpty) {\n\t\t\treturn null;\n\t\t}\n\t\treturn new Range(this.startLineNumber, 1, this.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER);\n\t}\n\n\t/**\n\t * @deprecated Using this function is discouraged because it might lead to bugs: The end position is not guaranteed to be a valid position!\n\t*/\n\tpublic toExclusiveRange(): Range {\n\t\treturn new Range(this.startLineNumber, 1, this.endLineNumberExclusive, 1);\n\t}\n\n\tpublic mapToLineArray<T>(f: (lineNumber: number) => T): T[] {\n\t\tconst result: T[] = [];\n\t\tfor (let lineNumber = this.startLineNumber; lineNumber < this.endLineNumberExclusive; lineNumber++) {\n\t\t\tresult.push(f(lineNumber));\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic forEach(f: (lineNumber: number) => void): void {\n\t\tfor (let lineNumber = this.startLineNumber; lineNumber < this.endLineNumberExclusive; lineNumber++) {\n\t\t\tf(lineNumber);\n\t\t}\n\t}\n\n\t/**\n\t * @internal\n\t */\n\tpublic serialize(): ISerializedLineRange {\n\t\treturn [this.startLineNumber, this.endLineNumberExclusive];\n\t}\n\n\t/**\n\t * Converts this 1-based line range to a 0-based offset range (subtracts 1!).\n\t * @internal\n\t */\n\tpublic toOffsetRange(): OffsetRange {\n\t\treturn new OffsetRange(this.startLineNumber - 1, this.endLineNumberExclusive - 1);\n\t}\n\n\tpublic addMargin(marginTop: number, marginBottom: number): LineRange {\n\t\treturn new LineRange(\n\t\t\tthis.startLineNumber - marginTop,\n\t\t\tthis.endLineNumberExclusive + marginBottom\n\t\t);\n\t}\n}\n\nexport type ISerializedLineRange = [startLineNumber: number, endLineNumberExclusive: number];\n\n\nexport class LineRangeSet {\n\tconstructor(\n\t\t/**\n\t\t * Sorted by start line number.\n\t\t * No two line ranges are touching or intersecting.\n\t\t */\n\t\tprivate readonly _normalizedRanges: LineRange[] = []\n\t) {\n\t}\n\n\tget ranges(): readonly LineRange[] {\n\t\treturn this._normalizedRanges;\n\t}\n\n\taddRange(range: LineRange): void {\n\t\tif (range.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Idea: Find joinRange such that:\n\t\t// replaceRange = _normalizedRanges.replaceRange(joinRange, range.joinAll(joinRange.map(idx => this._normalizedRanges[idx])))\n\n\t\t// idx of first element that touches range or that is after range\n\t\tconst joinRangeStartIdx = findFirstIdxMonotonousOrArrLen(this._normalizedRanges, r => r.endLineNumberExclusive >= range.startLineNumber);\n\t\t// idx of element after { last element that touches range or that is before range }\n\t\tconst joinRangeEndIdxExclusive = findLastIdxMonotonous(this._normalizedRanges, r => r.startLineNumber <= range.endLineNumberExclusive) + 1;\n\n\t\tif (joinRangeStartIdx === joinRangeEndIdxExclusive) {\n\t\t\t// If there is no element that touches range, then joinRangeStartIdx === joinRangeEndIdxExclusive and that value is the index of the element after range\n\t\t\tthis._normalizedRanges.splice(joinRangeStartIdx, 0, range);\n\t\t} else if (joinRangeStartIdx === joinRangeEndIdxExclusive - 1) {\n\t\t\t// Else, there is an element that touches range and in this case it is both the first and last element. Thus we can replace it\n\t\t\tconst joinRange = this._normalizedRanges[joinRangeStartIdx];\n\t\t\tthis._normalizedRanges[joinRangeStartIdx] = joinRange.join(range);\n\t\t} else {\n\t\t\t// First and last element are different - we need to replace the entire range\n\t\t\tconst joinRange = this._normalizedRanges[joinRangeStartIdx].join(this._normalizedRanges[joinRangeEndIdxExclusive - 1]).join(range);\n\t\t\tthis._normalizedRanges.splice(joinRangeStartIdx, joinRangeEndIdxExclusive - joinRangeStartIdx, joinRange);\n\t\t}\n\t}\n\n\tcontains(lineNumber: number): boolean {\n\t\tconst rangeThatStartsBeforeEnd = findLastMonotonous(this._normalizedRanges, r => r.startLineNumber <= lineNumber);\n\t\treturn !!rangeThatStartsBeforeEnd && rangeThatStartsBeforeEnd.endLineNumberExclusive > lineNumber;\n\t}\n\n\tintersects(range: LineRange): boolean {\n\t\tconst rangeThatStartsBeforeEnd = findLastMonotonous(this._normalizedRanges, r => r.startLineNumber < range.endLineNumberExclusive);\n\t\treturn !!rangeThatStartsBeforeEnd && rangeThatStartsBeforeEnd.endLineNumberExclusive > range.startLineNumber;\n\t}\n\n\tgetUnion(other: LineRangeSet): LineRangeSet {\n\t\tif (this._normalizedRanges.length === 0) {\n\t\t\treturn other;\n\t\t}\n\t\tif (other._normalizedRanges.length === 0) {\n\t\t\treturn this;\n\t\t}\n\n\t\tconst result: LineRange[] = [];\n\t\tlet i1 = 0;\n\t\tlet i2 = 0;\n\t\tlet current: LineRange | null = null;\n\t\twhile (i1 < this._normalizedRanges.length || i2 < other._normalizedRanges.length) {\n\t\t\tlet next: LineRange | null = null;\n\t\t\tif (i1 < this._normalizedRanges.length && i2 < other._normalizedRanges.length) {\n\t\t\t\tconst lineRange1 = this._normalizedRanges[i1];\n\t\t\t\tconst lineRange2 = other._normalizedRanges[i2];\n\t\t\t\tif (lineRange1.startLineNumber < lineRange2.startLineNumber) {\n\t\t\t\t\tnext = lineRange1;\n\t\t\t\t\ti1++;\n\t\t\t\t} else {\n\t\t\t\t\tnext = lineRange2;\n\t\t\t\t\ti2++;\n\t\t\t\t}\n\t\t\t} else if (i1 < this._normalizedRanges.length) {\n\t\t\t\tnext = this._normalizedRanges[i1];\n\t\t\t\ti1++;\n\t\t\t} else {\n\t\t\t\tnext = other._normalizedRanges[i2];\n\t\t\t\ti2++;\n\t\t\t}\n\n\t\t\tif (current === null) {\n\t\t\t\tcurrent = next;\n\t\t\t} else {\n\t\t\t\tif (current.endLineNumberExclusive >= next.startLineNumber) {\n\t\t\t\t\t// merge\n\t\t\t\t\tcurrent = new LineRange(current.startLineNumber, Math.max(current.endLineNumberExclusive, next.endLineNumberExclusive));\n\t\t\t\t} else {\n\t\t\t\t\t// push\n\t\t\t\t\tresult.push(current);\n\t\t\t\t\tcurrent = next;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (current !== null) {\n\t\t\tresult.push(current);\n\t\t}\n\t\treturn new LineRangeSet(result);\n\t}\n\n\t/**\n\t * Subtracts all ranges in this set from `range` and returns the result.\n\t */\n\tsubtractFrom(range: LineRange): LineRangeSet {\n\t\t// idx of first element that touches range or that is after range\n\t\tconst joinRangeStartIdx = findFirstIdxMonotonousOrArrLen(this._normalizedRanges, r => r.endLineNumberExclusive >= range.startLineNumber);\n\t\t// idx of element after { last element that touches range or that is before range }\n\t\tconst joinRangeEndIdxExclusive = findLastIdxMonotonous(this._normalizedRanges, r => r.startLineNumber <= range.endLineNumberExclusive) + 1;\n\n\t\tif (joinRangeStartIdx === joinRangeEndIdxExclusive) {\n\t\t\treturn new LineRangeSet([range]);\n\t\t}\n\n\t\tconst result: LineRange[] = [];\n\t\tlet startLineNumber = range.startLineNumber;\n\t\tfor (let i = joinRangeStartIdx; i < joinRangeEndIdxExclusive; i++) {\n\t\t\tconst r = this._normalizedRanges[i];\n\t\t\tif (r.startLineNumber > startLineNumber) {\n\t\t\t\tresult.push(new LineRange(startLineNumber, r.startLineNumber));\n\t\t\t}\n\t\t\tstartLineNumber = r.endLineNumberExclusive;\n\t\t}\n\t\tif (startLineNumber < range.endLineNumberExclusive) {\n\t\t\tresult.push(new LineRange(startLineNumber, range.endLineNumberExclusive));\n\t\t}\n\n\t\treturn new LineRangeSet(result);\n\t}\n\n\ttoString() {\n\t\treturn this._normalizedRanges.map(r => r.toString()).join(', ');\n\t}\n\n\tgetIntersection(other: LineRangeSet): LineRangeSet {\n\t\tconst result: LineRange[] = [];\n\n\t\tlet i1 = 0;\n\t\tlet i2 = 0;\n\t\twhile (i1 < this._normalizedRanges.length && i2 < other._normalizedRanges.length) {\n\t\t\tconst r1 = this._normalizedRanges[i1];\n\t\t\tconst r2 = other._normalizedRanges[i2];\n\n\t\t\tconst i = r1.intersect(r2);\n\t\t\tif (i && !i.isEmpty) {\n\t\t\t\tresult.push(i);\n\t\t\t}\n\n\t\t\tif (r1.endLineNumberExclusive < r2.endLineNumberExclusive) {\n\t\t\t\ti1++;\n\t\t\t} else {\n\t\t\t\ti2++;\n\t\t\t}\n\t\t}\n\n\t\treturn new LineRangeSet(result);\n\t}\n\n\tgetWithDelta(value: number): LineRangeSet {\n\t\treturn new LineRangeSet(this._normalizedRanges.map(r => r.delta(value)));\n\t}\n}\n"]}
@@ -14,48 +14,48 @@ const autoCloseNever = () => false;
14
14
  const autoCloseBeforeWhitespace = (chr) => (chr === ' ' || chr === '\t');
15
15
  export class CursorConfiguration {
16
16
  static shouldRecreate(e) {
17
- return (e.hasChanged(164 /* EditorOption.layoutInfo */)
18
- || e.hasChanged(147 /* EditorOption.wordSeparators */)
17
+ return (e.hasChanged(165 /* EditorOption.layoutInfo */)
18
+ || e.hasChanged(148 /* EditorOption.wordSeparators */)
19
19
  || e.hasChanged(45 /* EditorOption.emptySelectionClipboard */)
20
20
  || e.hasChanged(85 /* EditorOption.multiCursorMergeOverlapping */)
21
- || e.hasChanged(87 /* EditorOption.multiCursorPaste */)
22
- || e.hasChanged(88 /* EditorOption.multiCursorLimit */)
21
+ || e.hasChanged(88 /* EditorOption.multiCursorPaste */)
22
+ || e.hasChanged(89 /* EditorOption.multiCursorLimit */)
23
23
  || e.hasChanged(10 /* EditorOption.autoClosingBrackets */)
24
24
  || e.hasChanged(11 /* EditorOption.autoClosingComments */)
25
25
  || e.hasChanged(15 /* EditorOption.autoClosingQuotes */)
26
26
  || e.hasChanged(13 /* EditorOption.autoClosingDelete */)
27
27
  || e.hasChanged(14 /* EditorOption.autoClosingOvertype */)
28
28
  || e.hasChanged(20 /* EditorOption.autoSurround */)
29
- || e.hasChanged(144 /* EditorOption.useTabStops */)
30
- || e.hasChanged(140 /* EditorOption.trimWhitespaceOnDelete */)
29
+ || e.hasChanged(145 /* EditorOption.useTabStops */)
30
+ || e.hasChanged(141 /* EditorOption.trimWhitespaceOnDelete */)
31
31
  || e.hasChanged(59 /* EditorOption.fontInfo */)
32
- || e.hasChanged(103 /* EditorOption.readOnly */)
33
- || e.hasChanged(146 /* EditorOption.wordSegmenterLocales */)
34
- || e.hasChanged(92 /* EditorOption.overtypeOnPaste */));
32
+ || e.hasChanged(104 /* EditorOption.readOnly */)
33
+ || e.hasChanged(147 /* EditorOption.wordSegmenterLocales */)
34
+ || e.hasChanged(93 /* EditorOption.overtypeOnPaste */));
35
35
  }
36
36
  constructor(languageId, modelOptions, configuration, languageConfigurationService) {
37
37
  this.languageConfigurationService = languageConfigurationService;
38
38
  this._cursorMoveConfigurationBrand = undefined;
39
39
  this._languageId = languageId;
40
40
  const options = configuration.options;
41
- const layoutInfo = options.get(164 /* EditorOption.layoutInfo */);
41
+ const layoutInfo = options.get(165 /* EditorOption.layoutInfo */);
42
42
  const fontInfo = options.get(59 /* EditorOption.fontInfo */);
43
- this.readOnly = options.get(103 /* EditorOption.readOnly */);
43
+ this.readOnly = options.get(104 /* EditorOption.readOnly */);
44
44
  this.tabSize = modelOptions.tabSize;
45
45
  this.indentSize = modelOptions.indentSize;
46
46
  this.insertSpaces = modelOptions.insertSpaces;
47
- this.stickyTabStops = options.get(131 /* EditorOption.stickyTabStops */);
47
+ this.stickyTabStops = options.get(132 /* EditorOption.stickyTabStops */);
48
48
  this.lineHeight = fontInfo.lineHeight;
49
49
  this.typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth;
50
50
  this.pageSize = Math.max(1, Math.floor(layoutInfo.height / this.lineHeight) - 2);
51
- this.useTabStops = options.get(144 /* EditorOption.useTabStops */);
52
- this.trimWhitespaceOnDelete = options.get(140 /* EditorOption.trimWhitespaceOnDelete */);
53
- this.wordSeparators = options.get(147 /* EditorOption.wordSeparators */);
51
+ this.useTabStops = options.get(145 /* EditorOption.useTabStops */);
52
+ this.trimWhitespaceOnDelete = options.get(141 /* EditorOption.trimWhitespaceOnDelete */);
53
+ this.wordSeparators = options.get(148 /* EditorOption.wordSeparators */);
54
54
  this.emptySelectionClipboard = options.get(45 /* EditorOption.emptySelectionClipboard */);
55
55
  this.copyWithSyntaxHighlighting = options.get(31 /* EditorOption.copyWithSyntaxHighlighting */);
56
56
  this.multiCursorMergeOverlapping = options.get(85 /* EditorOption.multiCursorMergeOverlapping */);
57
- this.multiCursorPaste = options.get(87 /* EditorOption.multiCursorPaste */);
58
- this.multiCursorLimit = options.get(88 /* EditorOption.multiCursorLimit */);
57
+ this.multiCursorPaste = options.get(88 /* EditorOption.multiCursorPaste */);
58
+ this.multiCursorLimit = options.get(89 /* EditorOption.multiCursorLimit */);
59
59
  this.autoClosingBrackets = options.get(10 /* EditorOption.autoClosingBrackets */);
60
60
  this.autoClosingComments = options.get(11 /* EditorOption.autoClosingComments */);
61
61
  this.autoClosingQuotes = options.get(15 /* EditorOption.autoClosingQuotes */);
@@ -63,8 +63,8 @@ export class CursorConfiguration {
63
63
  this.autoClosingOvertype = options.get(14 /* EditorOption.autoClosingOvertype */);
64
64
  this.autoSurround = options.get(20 /* EditorOption.autoSurround */);
65
65
  this.autoIndent = options.get(16 /* EditorOption.autoIndent */);
66
- this.wordSegmenterLocales = options.get(146 /* EditorOption.wordSegmenterLocales */);
67
- this.overtypeOnPaste = options.get(92 /* EditorOption.overtypeOnPaste */);
66
+ this.wordSegmenterLocales = options.get(147 /* EditorOption.wordSegmenterLocales */);
67
+ this.overtypeOnPaste = options.get(93 /* EditorOption.overtypeOnPaste */);
68
68
  this.surroundingPairs = {};
69
69
  this._electricChars = null;
70
70
  this.shouldAutoCloseBefore = {