monaco-editor-core 0.57.0 → 0.58.0-dev-20261104
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/nls.keys.json +1 -1
- package/esm/nls.messages.cs.js +2 -2
- package/esm/nls.messages.de.js +2 -2
- package/esm/nls.messages.es.js +2 -2
- package/esm/nls.messages.fr.js +2 -2
- package/esm/nls.messages.it.js +2 -2
- package/esm/nls.messages.ja.js +2 -2
- package/esm/nls.messages.js +1 -1
- package/esm/nls.messages.json +1 -1
- package/esm/nls.messages.ko.js +2 -2
- package/esm/nls.messages.pl.js +2 -2
- package/esm/nls.messages.pt-br.js +2 -2
- package/esm/nls.messages.ru.js +2 -2
- package/esm/nls.messages.tr.js +2 -2
- package/esm/nls.messages.zh-cn.js +2 -2
- package/esm/nls.messages.zh-tw.js +2 -2
- package/esm/nls.metadata.json +38 -6
- package/esm/vs/base/browser/browser.js +8 -0
- package/esm/vs/base/browser/browser.js.map +1 -1
- package/esm/vs/base/browser/contextmenu.js +8 -1
- package/esm/vs/base/browser/contextmenu.js.map +1 -1
- package/esm/vs/base/browser/dom.js +34 -5
- package/esm/vs/base/browser/dom.js.map +1 -1
- package/esm/vs/base/browser/dompurify/dompurify.js +2457 -2640
- package/esm/vs/base/browser/markdownRenderer.js +48 -21
- package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
- package/esm/vs/base/browser/pixelRatio.js +3 -2
- package/esm/vs/base/browser/pixelRatio.js.map +1 -1
- package/esm/vs/base/browser/ui/actionbar/actionViewItems.js +5 -2
- package/esm/vs/base/browser/ui/actionbar/actionViewItems.js.map +1 -1
- package/esm/vs/base/browser/ui/actionbar/actionbar.js +7 -2
- package/esm/vs/base/browser/ui/actionbar/actionbar.js.map +1 -1
- package/esm/vs/base/browser/ui/animations/animations.js +68 -40
- package/esm/vs/base/browser/ui/animations/animations.js.map +1 -1
- package/esm/vs/base/browser/ui/button/button.js +7 -0
- package/esm/vs/base/browser/ui/button/button.js.map +1 -1
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/browser/ui/contextview/contextview.css +15 -0
- package/esm/vs/base/browser/ui/contextview/contextview.js +266 -40
- package/esm/vs/base/browser/ui/contextview/contextview.js.map +1 -1
- package/esm/vs/base/browser/ui/contextview/windowControlsOverlay.js +72 -0
- package/esm/vs/base/browser/ui/contextview/windowControlsOverlay.js.map +1 -0
- package/esm/vs/base/browser/ui/dialog/dialog.css +5 -0
- package/esm/vs/base/browser/ui/dropdown/dropdown.js +2 -1
- package/esm/vs/base/browser/ui/dropdown/dropdown.js.map +1 -1
- package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +1 -0
- package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js.map +1 -1
- package/esm/vs/base/browser/ui/hover/hover.js.map +1 -1
- package/esm/vs/base/browser/ui/list/listView.js +87 -15
- package/esm/vs/base/browser/ui/list/listView.js.map +1 -1
- package/esm/vs/base/browser/ui/list/listWidget.js +37 -15
- package/esm/vs/base/browser/ui/list/listWidget.js.map +1 -1
- package/esm/vs/base/browser/ui/menu/menu.js +189 -52
- package/esm/vs/base/browser/ui/menu/menu.js.map +1 -1
- package/esm/vs/base/browser/ui/radio/radio.css +11 -0
- package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js +2 -1
- package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js.map +1 -1
- package/esm/vs/base/browser/ui/selectBox/selectBox.js.map +1 -1
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js +14 -8
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js.map +1 -1
- package/esm/vs/base/browser/ui/splitview/splitview.js +11 -7
- package/esm/vs/base/browser/ui/splitview/splitview.js.map +1 -1
- package/esm/vs/base/browser/ui/toggle/switch.css +16 -7
- package/esm/vs/base/browser/ui/toggle/switch.js +9 -6
- package/esm/vs/base/browser/ui/toggle/switch.js.map +1 -1
- package/esm/vs/base/browser/ui/toolbar/toolbar.css +1 -2
- package/esm/vs/base/browser/ui/toolbar/toolbar.js +85 -38
- package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/abstractTree.js +48 -9
- package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js +10 -1
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/objectTree.js +3 -0
- package/esm/vs/base/browser/ui/tree/objectTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/tree.js.map +1 -1
- package/esm/vs/base/common/actions.js +8 -2
- package/esm/vs/base/common/actions.js.map +1 -1
- package/esm/vs/base/common/arrays.js +4 -4
- package/esm/vs/base/common/arrays.js.map +1 -1
- package/esm/vs/base/common/async.js +12 -8
- package/esm/vs/base/common/async.js.map +1 -1
- package/esm/vs/base/common/cancellation.js +25 -0
- package/esm/vs/base/common/cancellation.js.map +1 -1
- package/esm/vs/base/common/codicons.js +2 -0
- package/esm/vs/base/common/codicons.js.map +1 -1
- package/esm/vs/base/common/codiconsLibrary.js +2 -0
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/base/common/color.js +1 -1
- package/esm/vs/base/common/color.js.map +1 -1
- package/esm/vs/base/common/diff/diff.js +60 -1
- package/esm/vs/base/common/diff/diff.js.map +1 -1
- package/esm/vs/base/common/event.js +1 -1
- package/esm/vs/base/common/event.js.map +1 -1
- package/esm/vs/base/common/glob.js +1 -0
- package/esm/vs/base/common/glob.js.map +1 -1
- package/esm/vs/base/common/htmlContent.js +74 -12
- package/esm/vs/base/common/htmlContent.js.map +1 -1
- package/esm/vs/base/common/json.js +19 -0
- package/esm/vs/base/common/json.js.map +1 -0
- package/esm/vs/base/common/network.js +16 -0
- package/esm/vs/base/common/network.js.map +1 -1
- package/esm/vs/base/common/resources.js +14 -2
- package/esm/vs/base/common/resources.js.map +1 -1
- package/esm/vs/base/common/strings.js +1 -1
- package/esm/vs/base/common/strings.js.map +1 -1
- package/esm/vs/base/common/uri.js +2 -2
- package/esm/vs/base/common/uri.js.map +1 -1
- package/esm/vs/editor/browser/config/editorConfiguration.js +1 -1
- package/esm/vs/editor/browser/config/fontMeasurements.js +19 -6
- package/esm/vs/editor/browser/config/fontMeasurements.js.map +1 -1
- package/esm/vs/editor/browser/controller/dragScrolling.js +3 -3
- package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js +11 -5
- package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +8 -38
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/screenReaderContentRich.js +3 -3
- package/esm/vs/editor/browser/controller/editContext/native/screenReaderSupport.js +6 -6
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +12 -10
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseHandler.js +7 -7
- package/esm/vs/editor/browser/controller/mouseTarget.js +3 -3
- package/esm/vs/editor/browser/coreCommands.js +2 -2
- package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
- package/esm/vs/editor/browser/editorMarkdownSanitizer.js +19 -0
- package/esm/vs/editor/browser/editorMarkdownSanitizer.js.map +1 -0
- package/esm/vs/editor/browser/gpu/rectangleRenderer.js +1 -1
- package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -1
- package/esm/vs/editor/browser/observableCodeEditor.js +1 -1
- package/esm/vs/editor/browser/services/editorWorkerService.js +3 -2
- package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
- package/esm/vs/editor/browser/services/openerService.js +6 -2
- package/esm/vs/editor/browser/services/openerService.js.map +1 -1
- package/esm/vs/editor/browser/view/domLineBreaksComputer.js +34 -11
- package/esm/vs/editor/browser/view/domLineBreaksComputer.js.map +1 -1
- package/esm/vs/editor/browser/view/viewController.js +7 -7
- package/esm/vs/editor/browser/view/viewController.js.map +1 -1
- package/esm/vs/editor/browser/view/viewLayer.js +1 -1
- package/esm/vs/editor/browser/view/viewOverlays.js +4 -4
- package/esm/vs/editor/browser/view.js +5 -5
- package/esm/vs/editor/browser/viewParts/blockDecorations/blockDecorations.js +1 -1
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +11 -3
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +6 -6
- package/esm/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js +12 -12
- package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +9 -2
- package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.js +2 -2
- package/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js +2 -2
- package/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js +2 -2
- package/esm/vs/editor/browser/viewParts/margin/margin.js +2 -2
- package/esm/vs/editor/browser/viewParts/minimap/minimap.js +6 -6
- package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +9 -2
- package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js +5 -5
- package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +3 -3
- package/esm/vs/editor/browser/viewParts/rulers/rulers.js +2 -2
- package/esm/vs/editor/browser/viewParts/rulersGpu/rulersGpu.js +1 -1
- package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +3 -3
- package/esm/vs/editor/browser/viewParts/selections/selections.js +2 -2
- package/esm/vs/editor/browser/viewParts/viewCursors/viewCursor.js +2 -2
- package/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.js +6 -6
- package/esm/vs/editor/browser/viewParts/viewLines/viewLineOptions.js +5 -5
- package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js +11 -11
- package/esm/vs/editor/browser/viewParts/viewLinesGpu/viewLinesGpu.js +1 -1
- package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js +2 -2
- package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js +4 -4
- package/esm/vs/editor/browser/viewParts/wordWrapIndicator/wordWrapIndicator.js +2 -2
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +22 -21
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/commands.js +12 -12
- package/esm/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js +18 -18
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +3 -3
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js +10 -10
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +4 -4
- package/esm/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js +21 -3
- package/esm/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +10 -10
- package/esm/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/features/overviewRulerFeature.js +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/registrations.contribution.js +5 -5
- package/esm/vs/editor/browser/widget/multiDiffEditor/colors.js +3 -3
- package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollLayout.js +2 -2
- package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollLayout.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollView.js +21 -2
- package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollView.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +2 -2
- package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +11 -3
- package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/virtualizedItemManager.js +1 -0
- package/esm/vs/editor/browser/widget/multiDiffEditor/virtualizedItemManager.js.map +1 -1
- package/esm/vs/editor/common/commands/columnSelectionPasteCommand.js +64 -0
- package/esm/vs/editor/common/commands/columnSelectionPasteCommand.js.map +1 -0
- package/esm/vs/editor/common/config/editorConfigurationSchema.js +68 -58
- package/esm/vs/editor/common/config/editorConfigurationSchema.js.map +1 -1
- package/esm/vs/editor/common/config/editorOptions.js +560 -500
- package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
- package/esm/vs/editor/common/core/editorColorRegistry.js +71 -71
- package/esm/vs/editor/common/core/edits/textEdit.js +16 -0
- package/esm/vs/editor/common/core/edits/textEdit.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursor.js +20 -10
- package/esm/vs/editor/common/cursor/cursor.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorTypeEditOperations.js +67 -14
- package/esm/vs/editor/common/cursor/cursorTypeEditOperations.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorTypeOperations.js +2 -2
- package/esm/vs/editor/common/cursor/cursorTypeOperations.js.map +1 -1
- package/esm/vs/editor/common/cursorCommon.js +22 -21
- package/esm/vs/editor/common/cursorCommon.js.map +1 -1
- package/esm/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js +21 -8
- package/esm/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js.map +1 -1
- package/esm/vs/editor/common/diff/documentDiffProvider.js.map +1 -1
- package/esm/vs/editor/common/diff/externalLinesDiffComputer.js +38 -26
- package/esm/vs/editor/common/diff/externalLinesDiffComputer.js.map +1 -1
- package/esm/vs/editor/common/diff/rangeMapping.js +11 -1
- package/esm/vs/editor/common/diff/rangeMapping.js.map +1 -1
- package/esm/vs/editor/common/diff/verifyLinesDiff.js +28 -0
- package/esm/vs/editor/common/diff/verifyLinesDiff.js.map +1 -0
- package/esm/vs/editor/common/editorContextKeys.js +53 -53
- package/esm/vs/editor/common/languages/languageConfiguration.js +8 -0
- package/esm/vs/editor/common/languages/languageConfiguration.js.map +1 -1
- package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
- package/esm/vs/editor/common/languages.js +56 -56
- package/esm/vs/editor/common/model/editStack.js +1 -1
- package/esm/vs/editor/common/services/editorWebWorker.js +27 -6
- package/esm/vs/editor/common/services/editorWebWorker.js.map +1 -1
- package/esm/vs/editor/common/services/editorWorker.js.map +1 -1
- package/esm/vs/editor/common/services/languageService.js +6 -4
- package/esm/vs/editor/common/services/languageService.js.map +1 -1
- package/esm/vs/editor/common/services/markerDecorationsService.js +21 -2
- package/esm/vs/editor/common/services/markerDecorationsService.js.map +1 -1
- package/esm/vs/editor/common/standalone/standaloneEnums.js +100 -97
- package/esm/vs/editor/common/standalone/standaloneEnums.js.map +1 -1
- package/esm/vs/editor/common/standaloneStrings.js +11 -11
- package/esm/vs/editor/common/textModelEditSource.js +9 -0
- package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/viewLayout.js +16 -16
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
- package/esm/vs/editor/common/viewModel/monospaceLineBreaksComputer.js +1 -1
- package/esm/vs/editor/common/viewModel/viewModelImpl.js +19 -19
- package/esm/vs/editor/common/viewModel/viewModelImpl.js.map +1 -1
- package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
- package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +9 -9
- package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
- package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +23 -20
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js.map +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
- package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
- package/esm/vs/editor/contrib/codeAction/browser/codeActionModel.js +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
- package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js +25 -10
- package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js.map +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerContribution.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +3 -3
- package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
- package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerParticipant.js +1 -1
- package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +17 -17
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js.map +1 -1
- package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +39 -39
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js.map +1 -1
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/pasteEditSession.js +19 -0
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/pasteEditSession.js.map +1 -0
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +26 -18
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js.map +1 -1
- package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
- package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findController.js +18 -18
- package/esm/vs/editor/contrib/find/browser/findController.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findModel.js +6 -6
- package/esm/vs/editor/contrib/find/browser/findWidget.js +40 -40
- package/esm/vs/editor/contrib/find/browser/findWidget.js.map +1 -1
- package/esm/vs/editor/contrib/folding/browser/folding.js +23 -23
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
- package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
- package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
- package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
- package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
- package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +2 -2
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +4 -4
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js.map +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
- package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
- package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
- package/esm/vs/editor/contrib/hover/browser/contentHoverController.js +9 -3
- package/esm/vs/editor/contrib/hover/browser/contentHoverController.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js +2 -1
- package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
- package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +10 -8
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +6 -6
- package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +5 -5
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +9 -9
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsLocations.js +3 -3
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsLocations.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +21 -21
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +13 -13
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +7 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +6 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +7 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +6 -6
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +3 -3
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
- package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
- package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
- package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +32 -32
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +5 -4
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js.map +1 -1
- package/esm/vs/editor/contrib/links/browser/links.js +16 -15
- package/esm/vs/editor/contrib/links/browser/links.js.map +1 -1
- package/esm/vs/editor/contrib/longLinesHelper/browser/longLinesHelper.js +1 -1
- package/esm/vs/editor/contrib/message/browser/messageController.js +16 -12
- package/esm/vs/editor/contrib/message/browser/messageController.js.map +1 -1
- package/esm/vs/editor/contrib/middleScroll/browser/middleScrollController.js +1 -1
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +91 -55
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js.map +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsModel.js +3 -3
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsModel.js.map +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +6 -4
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js.map +1 -1
- package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
- package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
- package/esm/vs/editor/contrib/placeholderText/browser/placeholderTextContribution.js +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +12 -12
- package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
- package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +3 -3
- package/esm/vs/editor/contrib/rename/browser/rename.js +11 -11
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
- package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js +6 -6
- package/esm/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js +23 -13
- package/esm/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js.map +1 -1
- package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +5 -5
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +5 -5
- package/esm/vs/editor/contrib/snippet/browser/snippetSession.js +2 -2
- package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +10 -8
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js.map +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider.js +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js +2 -2
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +6 -6
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +9 -9
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +15 -15
- package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/suggestModel.js +11 -11
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +27 -27
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +8 -6
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +5 -5
- package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +3 -3
- package/esm/vs/editor/contrib/suggest/browser/wordDistance.js +1 -1
- package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
- package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
- package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +27 -27
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/textualHighlightProvider.js +1 -1
- package/esm/vs/editor/contrib/wordHighlighter/browser/textualHighlightProvider.js.map +1 -1
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +50 -14
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js.map +1 -1
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +6 -6
- package/esm/vs/editor/editor.api.d.ts +133 -98
- package/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js +1 -1
- package/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js +5 -3
- package/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js +15 -1
- package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js.map +1 -1
- package/esm/vs/nls.js.map +1 -1
- package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +72 -66
- package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js.map +1 -1
- package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
- package/esm/vs/platform/actionWidget/browser/actionList.js +434 -136
- package/esm/vs/platform/actionWidget/browser/actionList.js.map +1 -1
- package/esm/vs/platform/actionWidget/browser/actionWidget.css +74 -4
- package/esm/vs/platform/actionWidget/browser/actionWidget.js +24 -26
- package/esm/vs/platform/actionWidget/browser/actionWidget.js.map +1 -1
- package/esm/vs/platform/actionWidget/browser/actionWidgetMotion.js +16 -0
- package/esm/vs/platform/actionWidget/browser/actionWidgetMotion.js.map +1 -0
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +15 -17
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js.map +1 -1
- package/esm/vs/platform/actions/browser/toolbar.js +25 -12
- package/esm/vs/platform/actions/browser/toolbar.js.map +1 -1
- package/esm/vs/platform/actions/common/actions.js +4 -2
- package/esm/vs/platform/actions/common/actions.js.map +1 -1
- package/esm/vs/platform/actions/common/menuService.js +15 -8
- package/esm/vs/platform/actions/common/menuService.js.map +1 -1
- package/esm/vs/platform/configuration/common/configuration.js +3 -1
- package/esm/vs/platform/configuration/common/configuration.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurationModels.js +16 -11
- package/esm/vs/platform/configuration/common/configurationModels.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurationRegistry.js +29 -27
- package/esm/vs/platform/configuration/common/configurationRegistry.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurations.js +13 -1
- package/esm/vs/platform/configuration/common/configurations.js.map +1 -1
- package/esm/vs/platform/contextkey/browser/contextKeyService.js +2 -2
- package/esm/vs/platform/contextkey/browser/contextKeyService.js.map +1 -1
- package/esm/vs/platform/contextkey/common/contextkey.js +28 -14
- package/esm/vs/platform/contextkey/common/contextkey.js.map +1 -1
- package/esm/vs/platform/contextkey/common/contextkeys.js +10 -10
- package/esm/vs/platform/contextkey/common/scanner.js +5 -5
- package/esm/vs/platform/contextview/browser/contextMenuHandler.js +17 -4
- package/esm/vs/platform/contextview/browser/contextMenuHandler.js.map +1 -1
- package/esm/vs/platform/contextview/browser/contextMenuService.js +1 -1
- package/esm/vs/platform/contextview/browser/contextMenuService.js.map +1 -1
- package/esm/vs/platform/contextview/browser/contextView.js.map +1 -1
- package/esm/vs/platform/contextview/browser/contextViewService.js +7 -2
- package/esm/vs/platform/contextview/browser/contextViewService.js.map +1 -1
- package/esm/vs/platform/editor/common/editor.js +17 -0
- package/esm/vs/platform/editor/common/editor.js.map +1 -1
- package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/esm/vs/platform/hover/browser/hoverService.js +6 -3
- package/esm/vs/platform/hover/browser/hoverService.js.map +1 -1
- package/esm/vs/platform/hover/browser/hoverWidget.js +38 -6
- package/esm/vs/platform/hover/browser/hoverWidget.js.map +1 -1
- package/esm/vs/platform/hover/browser/updatableHoverWidget.js +32 -5
- package/esm/vs/platform/hover/browser/updatableHoverWidget.js.map +1 -1
- package/esm/vs/platform/instantiation/common/instantiationService.js +1 -1
- package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
- package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +5 -5
- package/esm/vs/platform/keybinding/common/keybindingResolver.js +1 -1
- package/esm/vs/platform/keybinding/common/keybindingResolver.js.map +1 -1
- package/esm/vs/platform/list/browser/listService.js +27 -27
- package/esm/vs/platform/markers/common/markerService.js +11 -8
- package/esm/vs/platform/markers/common/markerService.js.map +1 -1
- package/esm/vs/platform/markers/common/markers.js +6 -6
- package/esm/vs/platform/markers/common/markers.js.map +1 -1
- package/esm/vs/platform/notification/common/notification.js.map +1 -1
- package/esm/vs/platform/notification/common/notificationMessage.js +37 -0
- package/esm/vs/platform/notification/common/notificationMessage.js.map +1 -0
- package/esm/vs/platform/opener/common/opener.js.map +1 -1
- package/esm/vs/platform/progress/common/progress.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +8 -8
- package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
- package/esm/vs/platform/quickinput/browser/media/quickInput.css +33 -2
- package/esm/vs/platform/quickinput/browser/quickAccess.js +7 -4
- package/esm/vs/platform/quickinput/browser/quickAccess.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
- package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
- package/esm/vs/platform/quickinput/browser/quickInputController.js +65 -15
- package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputList.js +96 -90
- package/esm/vs/platform/quickinput/browser/quickInputList.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputService.js +5 -7
- package/esm/vs/platform/quickinput/browser/quickInputService.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickTree.js +1 -1
- package/esm/vs/platform/quickinput/common/quickAccess.js.map +1 -1
- package/esm/vs/platform/quickinput/common/quickInput.js.map +1 -1
- package/esm/vs/platform/storage/common/storage.js.map +1 -1
- package/esm/vs/platform/theme/common/colorRegistry.js +1 -0
- package/esm/vs/platform/theme/common/colorRegistry.js.map +1 -1
- package/esm/vs/platform/theme/common/colorUtils.js +11 -3
- package/esm/vs/platform/theme/common/colorUtils.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/baseColors.js +19 -19
- package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -9
- package/esm/vs/platform/theme/common/colors/chartsColors.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/confettiColors.js +14 -0
- package/esm/vs/platform/theme/common/colors/confettiColors.js.map +1 -0
- package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
- package/esm/vs/platform/theme/common/colors/inputColors.js +48 -48
- package/esm/vs/platform/theme/common/colors/inputColors.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
- package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
- package/esm/vs/platform/theme/common/colors/minimapColors.js +13 -13
- package/esm/vs/platform/theme/common/colors/minimapColors.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
- package/esm/vs/platform/theme/common/colors/quickpickColors.js +10 -10
- package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
- package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
- package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
- package/esm/vs/platform/workspace/common/workspace.js +1 -1
- package/monaco.d.ts +133 -98
- package/package.json +3 -3
- package/version.txt +1 -1
|
@@ -261,7 +261,9 @@ let StickyScrollController = class StickyScrollController extends Disposable {
|
|
|
261
261
|
this._revealPosition(position);
|
|
262
262
|
}));
|
|
263
263
|
this._register(dom.addDisposableListener(mainWindow, dom.EventType.MOUSE_MOVE, mouseEvent => {
|
|
264
|
-
|
|
264
|
+
// Only remember targets inside the widget to not retain arbitrary, later detached, DOM (#146841)
|
|
265
|
+
const target = mouseEvent.target;
|
|
266
|
+
this._mouseTarget = dom.isHTMLElement(target) && this._stickyScrollWidget.getDomNode().contains(target) ? target : null;
|
|
265
267
|
this._onMouseMoveOrKeyDown(mouseEvent);
|
|
266
268
|
}));
|
|
267
269
|
this._register(dom.addDisposableListener(mainWindow, dom.EventType.KEY_DOWN, mouseEvent => {
|
|
@@ -384,7 +386,7 @@ let StickyScrollController = class StickyScrollController extends Disposable {
|
|
|
384
386
|
this._renderStickyScroll(line);
|
|
385
387
|
}
|
|
386
388
|
_readConfiguration() {
|
|
387
|
-
const options = this._editor.getOption(
|
|
389
|
+
const options = this._editor.getOption(134 /* EditorOption.stickyScroll */);
|
|
388
390
|
if (options.enabled === false) {
|
|
389
391
|
this._editor.removeOverlayWidget(this._stickyScrollWidget);
|
|
390
392
|
this._resetState();
|
|
@@ -430,18 +432,18 @@ let StickyScrollController = class StickyScrollController extends Disposable {
|
|
|
430
432
|
}
|
|
431
433
|
}
|
|
432
434
|
_readConfigurationChange(event) {
|
|
433
|
-
if (event.hasChanged(
|
|
434
|
-
|| event.hasChanged(
|
|
435
|
+
if (event.hasChanged(134 /* EditorOption.stickyScroll */)
|
|
436
|
+
|| event.hasChanged(82 /* EditorOption.minimap */)
|
|
435
437
|
|| event.hasChanged(75 /* EditorOption.lineHeight */)
|
|
436
|
-
|| event.hasChanged(
|
|
438
|
+
|| event.hasChanged(129 /* EditorOption.showFoldingControls */)
|
|
437
439
|
|| event.hasChanged(76 /* EditorOption.lineNumbers */)) {
|
|
438
440
|
this._readConfiguration();
|
|
439
441
|
}
|
|
440
442
|
if (event.hasChanged(76 /* EditorOption.lineNumbers */)
|
|
441
443
|
|| event.hasChanged(52 /* EditorOption.folding */)
|
|
442
|
-
|| event.hasChanged(
|
|
444
|
+
|| event.hasChanged(129 /* EditorOption.showFoldingControls */)
|
|
443
445
|
|| event.hasChanged(59 /* EditorOption.fontInfo */)
|
|
444
|
-
|| event.hasChanged(
|
|
446
|
+
|| event.hasChanged(179 /* EditorOption.effectiveFullwidthCharacterWidth */)) {
|
|
445
447
|
this._renderStickyScroll(0);
|
|
446
448
|
}
|
|
447
449
|
}
|
|
@@ -534,7 +536,7 @@ let StickyScrollController = class StickyScrollController extends Disposable {
|
|
|
534
536
|
this._stickyScrollWidget.setState(undefined, undefined);
|
|
535
537
|
}
|
|
536
538
|
findScrollWidgetState() {
|
|
537
|
-
const maxNumberStickyLines = Math.min(this._maxStickyLines, this._editor.getOption(
|
|
539
|
+
const maxNumberStickyLines = Math.min(this._maxStickyLines, this._editor.getOption(134 /* EditorOption.stickyScroll */).maxLineCount);
|
|
538
540
|
const scrollTop = this._editor.getScrollTop();
|
|
539
541
|
let lastLineRelativePosition = 0;
|
|
540
542
|
const startLineNumbers = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/stickyScroll/browser/stickyScrollController.ts","vs/editor/contrib/stickyScroll/browser/stickyScrollController.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAEhG,OAAO,EAAe,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAG9G,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAExF,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACtF,OAAO,EAAgC,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAEtG,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AACnG,OAAO,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC;AAC9F,OAAO,EAAE,MAAM,EAAE,MAAM,gDAAgD,CAAC;AACxE,OAAO,EAAe,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AACvG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAuB,MAAM,mDAAmD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AAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAC7B,cAAc,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;oBAC7B,IAAI,eAAe,GAAG,eAAe,EAAE,CAAC;wBACvC,wBAAwB,GAAG,eAAe,GAAG,eAAe,CAAC;oBAC9D,CAAC;gBACF,CAAC;gBACD,IAAI,gBAAgB,CAAC,MAAM,KAAK,oBAAoB,EAAE,CAAC;oBACtD,MAAM;gBACP,CAAC;YACF,CAAC;QACF,CAAC;QACD,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;QACtC,OAAO,IAAI,uBAAuB,CAAC,gBAAgB,EAAE,cAAc,EAAE,wBAAwB,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;IACtH,CAAC;IAEQ,OAAO;QACf,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC;IAC9B,CAAC;;AAhlBW,sBAAsB;IAoChC,WAAA,mBAAmB,CAAA;IACnB,WAAA,wBAAwB,CAAA;IACxB,WAAA,qBAAqB,CAAA;IACrB,WAAA,6BAA6B,CAAA;IAC7B,WAAA,+BAA+B,CAAA;IAC/B,WAAA,kBAAkB,CAAA;GAzCR,sBAAsB,CAilBlC","file":"stickyScrollController.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 { IDisposable, Disposable, DisposableStore, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor, MouseTargetType } from '../../../browser/editorBrowser.js';\nimport { IEditorContribution, ScrollType } from '../../../common/editorCommon.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { EditorOption, RenderLineNumbersType, ConfigurationChangedEvent } from '../../../common/config/editorOptions.js';\nimport { StickyScrollWidget, StickyScrollWidgetState } from './stickyScrollWidget.js';\nimport { IStickyLineCandidateProvider, StickyLineCandidateProvider } from './stickyScrollProvider.js';\nimport { IModelTokensChangedEvent } from '../../../common/textModelEvents.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js';\nimport { MenuId } from '../../../../platform/actions/common/actions.js';\nimport { IContextKey, IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\nimport { ClickLinkGesture, ClickLinkMouseEvent } from '../../gotoSymbol/browser/link/clickLinkGesture.js';\nimport { IRange, Range } from '../../../common/core/range.js';\nimport { getDefinitionsAtPosition } from '../../gotoSymbol/browser/goToSymbol.js';\nimport { goToDefinitionWithLocation } from '../../inlayHints/browser/inlayHintsLocations.js';\nimport { IPosition, Position } from '../../../common/core/position.js';\nimport { CancellationTokenSource } from '../../../../base/common/cancellation.js';\nimport { ILanguageConfigurationService } from '../../../common/languages/languageConfigurationRegistry.js';\nimport { ILanguageFeatureDebounceService } from '../../../common/services/languageFeatureDebounce.js';\nimport * as dom from '../../../../base/browser/dom.js';\nimport { StickyRange } from './stickyScrollElement.js';\nimport { IMouseEvent, StandardMouseEvent } from '../../../../base/browser/mouseEvent.js';\nimport { FoldingController } from '../../folding/browser/folding.js';\nimport { FoldingModel, toggleCollapseState } from '../../folding/browser/foldingModel.js';\nimport { Emitter, Event } from '../../../../base/common/event.js';\nimport { mainWindow } from '../../../../base/browser/window.js';\n\nexport interface IStickyScrollController {\n\treadonly stickyScrollWidgetHeight: number;\n\tisFocused(): boolean;\n\tfocus(): void;\n\tfocusNext(): void;\n\tfocusPrevious(): void;\n\tgoToFocused(): void;\n\tdispose(): void;\n\tselectEditor(): void;\n\treadonly onDidChangeStickyScrollHeight: Event<{ height: number }>;\n}\n\nexport class StickyScrollController extends Disposable implements IEditorContribution, IStickyScrollController {\n\n\tstatic readonly ID = 'store.contrib.stickyScrollController';\n\n\tprivate readonly _stickyScrollWidget: StickyScrollWidget;\n\tprivate readonly _stickyLineCandidateProvider: IStickyLineCandidateProvider;\n\tprivate readonly _sessionStore: DisposableStore = new DisposableStore();\n\n\tprivate _widgetState: StickyScrollWidgetState;\n\tprivate _foldingModel: FoldingModel | undefined;\n\tprivate _maxStickyLines: number = Number.MAX_SAFE_INTEGER;\n\n\tprivate _stickyRangeProjectedOnEditor: IRange | undefined;\n\tprivate _candidateDefinitionsLength: number = -1;\n\n\tprivate _stickyScrollFocusedContextKey: IContextKey<boolean>;\n\tprivate _stickyScrollVisibleContextKey: IContextKey<boolean>;\n\n\tprivate _focusDisposableStore: DisposableStore | undefined;\n\tprivate _focusedStickyElementIndex: number = -1;\n\tprivate _enabled = false;\n\tprivate _focused = false;\n\tprivate _positionRevealed = false;\n\tprivate _onMouseDown = false;\n\tprivate _endLineNumbers: number[] = [];\n\tprivate _showEndForLine: number | undefined;\n\tprivate _minRebuildFromLine: number | undefined;\n\tprivate _mouseTarget: EventTarget | null = null;\n\tprivate _cursorPositionListener: IDisposable | undefined;\n\tprivate _positionLineNumber: number | undefined;\n\n\tprivate readonly _onDidChangeStickyScrollHeight = this._register(new Emitter<{ height: number }>());\n\tpublic readonly onDidChangeStickyScrollHeight = this._onDidChangeStickyScrollHeight.event;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@IContextMenuService private readonly _contextMenuService: IContextMenuService,\n\t\t@ILanguageFeaturesService private readonly _languageFeaturesService: ILanguageFeaturesService,\n\t\t@IInstantiationService private readonly _instaService: IInstantiationService,\n\t\t@ILanguageConfigurationService _languageConfigurationService: ILanguageConfigurationService,\n\t\t@ILanguageFeatureDebounceService _languageFeatureDebounceService: ILanguageFeatureDebounceService,\n\t\t@IContextKeyService private readonly _contextKeyService: IContextKeyService\n\t) {\n\t\tsuper();\n\t\tthis._stickyScrollWidget = new StickyScrollWidget(this._editor);\n\t\tthis._stickyLineCandidateProvider = new StickyLineCandidateProvider(this._editor, _languageFeaturesService, _languageConfigurationService);\n\t\tthis._register(this._stickyScrollWidget);\n\t\tthis._register(this._stickyLineCandidateProvider);\n\n\t\tthis._widgetState = StickyScrollWidgetState.Empty;\n\t\tconst stickyScrollDomNode = this._stickyScrollWidget.getDomNode();\n\t\tthis._register(this._editor.onDidChangeLineHeight((e) => {\n\t\t\te.changes.forEach((change) => {\n\t\t\t\tconst lineNumber = change.lineNumber;\n\t\t\t\tif (this._widgetState.startLineNumbers.includes(lineNumber)) {\n\t\t\t\t\tthis._renderStickyScroll(lineNumber);\n\t\t\t\t}\n\t\t\t});\n\t\t}));\n\t\tthis._register(this._editor.onDidChangeFont((e) => {\n\t\t\te.changes.forEach((change) => {\n\t\t\t\tconst lineNumber = change.lineNumber;\n\t\t\t\tif (this._widgetState.startLineNumbers.includes(lineNumber)) {\n\t\t\t\t\tthis._renderStickyScroll(lineNumber);\n\t\t\t\t}\n\t\t\t});\n\t\t}));\n\t\tthis._register(this._editor.onDidChangeConfiguration(e => {\n\t\t\tthis._readConfigurationChange(e);\n\t\t}));\n\t\tthis._register(dom.addDisposableListener(stickyScrollDomNode, dom.EventType.CONTEXT_MENU, async (event: MouseEvent) => {\n\t\t\tthis._onContextMenu(dom.getWindow(stickyScrollDomNode), event);\n\t\t}));\n\t\tthis._stickyScrollFocusedContextKey = EditorContextKeys.stickyScrollFocused.bindTo(this._contextKeyService);\n\t\tthis._stickyScrollVisibleContextKey = EditorContextKeys.stickyScrollVisible.bindTo(this._contextKeyService);\n\t\tconst focusTracker = this._register(dom.trackFocus(stickyScrollDomNode));\n\t\tthis._register(focusTracker.onDidBlur(_ => {\n\t\t\t// Suppose that the blurring is caused by scrolling, then keep the focus on the sticky scroll\n\t\t\t// This is determined by the fact that the height of the widget has become zero and there has been no position revealing\n\t\t\tif (this._positionRevealed === false && stickyScrollDomNode.clientHeight === 0) {\n\t\t\t\tthis._focusedStickyElementIndex = -1;\n\t\t\t\tthis.focus();\n\n\t\t\t}\n\t\t\t// In all other casees, dispose the focus on the sticky scroll\n\t\t\telse {\n\t\t\t\tthis._disposeFocusStickyScrollStore();\n\t\t\t}\n\t\t}));\n\t\tthis._register(focusTracker.onDidFocus(_ => {\n\t\t\tthis.focus();\n\t\t}));\n\t\tthis._registerMouseListeners();\n\t\t// Suppose that mouse down on the sticky scroll, then do not focus on the sticky scroll because this will be followed by the revealing of a position\n\t\tthis._register(dom.addDisposableListener(stickyScrollDomNode, dom.EventType.MOUSE_DOWN, (e) => {\n\t\t\tthis._onMouseDown = true;\n\t\t}));\n\t\tthis._register(this._stickyScrollWidget.onDidChangeStickyScrollHeight((e) => {\n\t\t\tthis._onDidChangeStickyScrollHeight.fire(e);\n\t\t}));\n\t\tthis._onDidResize();\n\t\tthis._readConfiguration();\n\t}\n\n\tget stickyScrollWidgetHeight(): number {\n\t\treturn this._stickyScrollWidget.height;\n\t}\n\n\tpublic static get(editor: ICodeEditor): IStickyScrollController | null {\n\t\treturn editor.getContribution<StickyScrollController>(StickyScrollController.ID);\n\t}\n\n\tprivate _disposeFocusStickyScrollStore() {\n\t\tthis._stickyScrollFocusedContextKey.set(false);\n\t\tthis._focusDisposableStore?.dispose();\n\t\tthis._focused = false;\n\t\tthis._positionRevealed = false;\n\t\tthis._onMouseDown = false;\n\t}\n\n\tpublic isFocused(): boolean {\n\t\treturn this._focused;\n\t}\n\n\tpublic focus(): void {\n\t\t// If the mouse is down, do not focus on the sticky scroll\n\t\tif (this._onMouseDown) {\n\t\t\tthis._onMouseDown = false;\n\t\t\tthis._editor.focus();\n\t\t\treturn;\n\t\t}\n\t\tconst focusState = this._stickyScrollFocusedContextKey.get();\n\t\tif (focusState === true) {\n\t\t\treturn;\n\t\t}\n\t\tthis._focused = true;\n\t\tthis._focusDisposableStore = new DisposableStore();\n\t\tthis._stickyScrollFocusedContextKey.set(true);\n\t\tthis._focusedStickyElementIndex = this._stickyScrollWidget.lineNumbers.length - 1;\n\t\tthis._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);\n\t}\n\n\tpublic focusNext(): void {\n\t\tif (this._focusedStickyElementIndex < this._stickyScrollWidget.lineNumberCount - 1) {\n\t\t\tthis._focusNav(true);\n\t\t}\n\t}\n\n\tpublic focusPrevious(): void {\n\t\tif (this._focusedStickyElementIndex > 0) {\n\t\t\tthis._focusNav(false);\n\t\t}\n\t}\n\n\tpublic selectEditor(): void {\n\t\tthis._editor.focus();\n\t}\n\n\t// True is next, false is previous\n\tprivate _focusNav(direction: boolean): void {\n\t\tthis._focusedStickyElementIndex = direction ? this._focusedStickyElementIndex + 1 : this._focusedStickyElementIndex - 1;\n\t\tthis._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);\n\t}\n\n\tpublic goToFocused(): void {\n\t\tconst lineNumbers = this._stickyScrollWidget.lineNumbers;\n\t\tthis._disposeFocusStickyScrollStore();\n\t\tthis._revealPosition({ lineNumber: lineNumbers[this._focusedStickyElementIndex], column: 1 });\n\t}\n\n\tprivate _revealPosition(position: IPosition): void {\n\t\tthis._reveaInEditor(position, () => this._editor.revealPosition(position));\n\t}\n\n\tprivate _revealLineInCenterIfOutsideViewport(position: IPosition): void {\n\t\tthis._reveaInEditor(position, () => this._editor.revealLineInCenterIfOutsideViewport(position.lineNumber, ScrollType.Smooth));\n\t}\n\n\tprivate _reveaInEditor(position: IPosition, revealFunction: () => void): void {\n\t\tif (this._focused) {\n\t\t\tthis._disposeFocusStickyScrollStore();\n\t\t}\n\t\tthis._positionRevealed = true;\n\t\trevealFunction();\n\t\tthis._editor.setSelection(Range.fromPositions(position));\n\t\tthis._editor.focus();\n\t}\n\n\tprivate _registerMouseListeners(): void {\n\n\t\tconst sessionStore = this._register(new DisposableStore());\n\t\tconst gesture = this._register(new ClickLinkGesture(this._editor, {\n\t\t\textractLineNumberFromMouseEvent: (e) => {\n\t\t\t\tconst position = this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);\n\t\t\t\treturn position ? position.lineNumber : 0;\n\t\t\t}\n\t\t}));\n\n\t\tconst getMouseEventTarget = (mouseEvent: ClickLinkMouseEvent): { range: Range; textElement: HTMLElement } | null => {\n\t\t\tif (!this._editor.hasModel()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tif (mouseEvent.target.type !== MouseTargetType.OVERLAY_WIDGET || mouseEvent.target.detail !== this._stickyScrollWidget.getId()) {\n\t\t\t\t// not hovering over our widget\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tconst mouseTargetElement = mouseEvent.target.element;\n\t\t\tif (!mouseTargetElement || mouseTargetElement.innerText !== mouseTargetElement.innerHTML) {\n\t\t\t\t// not on a span element rendering text\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tconst position = this._stickyScrollWidget.getEditorPositionFromNode(mouseTargetElement);\n\t\t\tif (!position) {\n\t\t\t\t// not hovering a sticky scroll line\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\trange: new Range(position.lineNumber, position.column, position.lineNumber, position.column + mouseTargetElement.innerText.length),\n\t\t\t\ttextElement: mouseTargetElement\n\t\t\t};\n\t\t};\n\n\t\tconst stickyScrollWidgetDomNode = this._stickyScrollWidget.getDomNode();\n\t\tthis._register(dom.addStandardDisposableListener(stickyScrollWidgetDomNode, dom.EventType.CLICK, (mouseEvent: IMouseEvent) => {\n\t\t\tif (mouseEvent.ctrlKey || mouseEvent.altKey || mouseEvent.metaKey) {\n\t\t\t\t// modifier pressed\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!mouseEvent.leftButton) {\n\t\t\t\t// not left click\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (mouseEvent.shiftKey) {\n\t\t\t\t// shift click\n\t\t\t\tconst lineIndex = this._stickyScrollWidget.getLineIndexFromChildDomNode(mouseEvent.target);\n\t\t\t\tif (lineIndex === null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst position = new Position(this._endLineNumbers[lineIndex], 1);\n\t\t\t\tthis._revealLineInCenterIfOutsideViewport(position);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst isInFoldingIconDomNode = this._stickyScrollWidget.isInFoldingIconDomNode(mouseEvent.target);\n\t\t\tif (isInFoldingIconDomNode) {\n\t\t\t\t// clicked on folding icon\n\t\t\t\tconst lineNumber = this._stickyScrollWidget.getLineNumberFromChildDomNode(mouseEvent.target);\n\t\t\t\tthis._toggleFoldingRegionForLine(lineNumber);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst isInStickyLine = this._stickyScrollWidget.isInStickyLine(mouseEvent.target);\n\t\t\tif (!isInStickyLine) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// normal click\n\t\t\tlet position = this._stickyScrollWidget.getEditorPositionFromNode(mouseEvent.target);\n\t\t\tif (!position) {\n\t\t\t\tconst lineNumber = this._stickyScrollWidget.getLineNumberFromChildDomNode(mouseEvent.target);\n\t\t\t\tif (lineNumber === null) {\n\t\t\t\t\t// not hovering a sticky scroll line\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tposition = new Position(lineNumber, 1);\n\t\t\t}\n\t\t\tthis._revealPosition(position);\n\t\t}));\n\t\tthis._register(dom.addDisposableListener(mainWindow, dom.EventType.MOUSE_MOVE, mouseEvent => {\n\t\t\tthis._mouseTarget = mouseEvent.target;\n\t\t\tthis._onMouseMoveOrKeyDown(mouseEvent);\n\t\t}));\n\t\tthis._register(dom.addDisposableListener(mainWindow, dom.EventType.KEY_DOWN, mouseEvent => {\n\t\t\tthis._onMouseMoveOrKeyDown(mouseEvent);\n\t\t}));\n\t\tthis._register(dom.addDisposableListener(mainWindow, dom.EventType.KEY_UP, () => {\n\t\t\tif (this._showEndForLine !== undefined) {\n\t\t\t\tthis._showEndForLine = undefined;\n\t\t\t\tthis._renderStickyScroll();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(gesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, _keyboardEvent]) => {\n\t\t\tconst mouseTarget = getMouseEventTarget(mouseEvent);\n\t\t\tif (!mouseTarget || !mouseEvent.hasTriggerModifier || !this._editor.hasModel()) {\n\t\t\t\tsessionStore.clear();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { range, textElement } = mouseTarget;\n\n\t\t\tif (!range.equalsRange(this._stickyRangeProjectedOnEditor)) {\n\t\t\t\tthis._stickyRangeProjectedOnEditor = range;\n\t\t\t\tsessionStore.clear();\n\t\t\t} else if (textElement.style.textDecoration === 'underline') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst cancellationToken = new CancellationTokenSource();\n\t\t\tsessionStore.add(toDisposable(() => cancellationToken.dispose(true)));\n\n\t\t\tlet currentHTMLChild: HTMLElement;\n\n\t\t\tgetDefinitionsAtPosition(this._languageFeaturesService.definitionProvider, this._editor.getModel(), new Position(range.startLineNumber, range.startColumn + 1), false, cancellationToken.token).then((candidateDefinitions => {\n\t\t\t\tif (cancellationToken.token.isCancellationRequested) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (candidateDefinitions.length !== 0) {\n\t\t\t\t\tthis._candidateDefinitionsLength = candidateDefinitions.length;\n\t\t\t\t\tconst childHTML: HTMLElement = textElement;\n\t\t\t\t\tif (currentHTMLChild !== childHTML) {\n\t\t\t\t\t\tsessionStore.clear();\n\t\t\t\t\t\tcurrentHTMLChild = childHTML;\n\t\t\t\t\t\tcurrentHTMLChild.style.textDecoration = 'underline';\n\t\t\t\t\t\tsessionStore.add(toDisposable(() => {\n\t\t\t\t\t\t\tcurrentHTMLChild.style.textDecoration = 'none';\n\t\t\t\t\t\t}));\n\t\t\t\t\t} else if (!currentHTMLChild) {\n\t\t\t\t\t\tcurrentHTMLChild = childHTML;\n\t\t\t\t\t\tcurrentHTMLChild.style.textDecoration = 'underline';\n\t\t\t\t\t\tsessionStore.add(toDisposable(() => {\n\t\t\t\t\t\t\tcurrentHTMLChild.style.textDecoration = 'none';\n\t\t\t\t\t\t}));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tsessionStore.clear();\n\t\t\t\t}\n\t\t\t}));\n\t\t}));\n\t\tthis._register(gesture.onCancel(() => {\n\t\t\tsessionStore.clear();\n\t\t}));\n\t\tthis._register(gesture.onExecute(async e => {\n\t\t\tif (e.target.type !== MouseTargetType.OVERLAY_WIDGET || e.target.detail !== this._stickyScrollWidget.getId()) {\n\t\t\t\t// not hovering over our widget\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst position = this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);\n\t\t\tif (!position) {\n\t\t\t\t// not hovering a sticky scroll line\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!this._editor.hasModel() || !this._stickyRangeProjectedOnEditor) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this._candidateDefinitionsLength > 1) {\n\t\t\t\tif (this._focused) {\n\t\t\t\t\tthis._disposeFocusStickyScrollStore();\n\t\t\t\t}\n\t\t\t\tthis._revealPosition({ lineNumber: position.lineNumber, column: 1 });\n\t\t\t}\n\t\t\tthis._instaService.invokeFunction(goToDefinitionWithLocation, e, this._editor, { uri: this._editor.getModel().uri, range: this._stickyRangeProjectedOnEditor });\n\t\t}));\n\t}\n\n\tprivate _onContextMenu(targetWindow: Window, e: MouseEvent) {\n\t\tconst event = new StandardMouseEvent(targetWindow, e);\n\n\t\tthis._contextMenuService.showContextMenu({\n\t\t\tmenuId: MenuId.StickyScrollContext,\n\t\t\tgetAnchor: () => event,\n\t\t\tmenuActionOptions: { renderShortTitle: true },\n\t\t});\n\t}\n\n\tprivate _onMouseMoveOrKeyDown(mouseEvent: KeyboardEvent | MouseEvent): void {\n\t\tif (!mouseEvent.shiftKey) {\n\t\t\treturn;\n\t\t}\n\t\tif (!this._mouseTarget || !dom.isHTMLElement(this._mouseTarget)) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentEndForLineIndex = this._stickyScrollWidget.getLineIndexFromChildDomNode(this._mouseTarget);\n\t\tif (currentEndForLineIndex === null || this._showEndForLine === currentEndForLineIndex) {\n\t\t\treturn;\n\t\t}\n\t\tthis._showEndForLine = currentEndForLineIndex;\n\t\tthis._renderStickyScroll();\n\t}\n\n\tprivate _toggleFoldingRegionForLine(line: number | null) {\n\t\tif (!this._foldingModel || line === null) {\n\t\t\treturn;\n\t\t}\n\t\tconst stickyLine = this._stickyScrollWidget.getRenderedStickyLine(line);\n\t\tconst foldingIcon = stickyLine?.foldingIcon;\n\t\tif (!foldingIcon) {\n\t\t\treturn;\n\t\t}\n\t\ttoggleCollapseState(this._foldingModel, 1, [line]);\n\t\tfoldingIcon.isCollapsed = !foldingIcon.isCollapsed;\n\t\tconst scrollTop = (foldingIcon.isCollapsed ?\n\t\t\tthis._editor.getTopForLineNumber(foldingIcon.foldingEndLine)\n\t\t\t: this._editor.getTopForLineNumber(foldingIcon.foldingStartLine))\n\t\t\t- this._editor.getOption(EditorOption.lineHeight) * stickyLine.index + 1;\n\t\tthis._editor.setScrollTop(scrollTop);\n\t\tthis._renderStickyScroll(line);\n\t}\n\n\tprivate _readConfiguration() {\n\t\tconst options = this._editor.getOption(EditorOption.stickyScroll);\n\t\tif (options.enabled === false) {\n\t\t\tthis._editor.removeOverlayWidget(this._stickyScrollWidget);\n\t\t\tthis._resetState();\n\t\t\tthis._sessionStore.clear();\n\t\t\tthis._enabled = false;\n\t\t\treturn;\n\t\t} else if (options.enabled && !this._enabled) {\n\t\t\t// When sticky scroll was just enabled, add the listeners on the sticky scroll\n\t\t\tthis._editor.addOverlayWidget(this._stickyScrollWidget);\n\t\t\tthis._sessionStore.add(this._editor.onDidScrollChange((e) => {\n\t\t\t\tif (e.scrollTopChanged) {\n\t\t\t\t\tthis._showEndForLine = undefined;\n\t\t\t\t\tthis._renderStickyScroll();\n\t\t\t\t}\n\t\t\t}));\n\t\t\tthis._sessionStore.add(this._editor.onDidLayoutChange(() => this._onDidResize()));\n\t\t\tthis._sessionStore.add(this._editor.onDidChangeModelTokens((e) => this._onTokensChange(e)));\n\t\t\tthis._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(() => {\n\t\t\t\tthis._showEndForLine = undefined;\n\t\t\t\tthis._renderStickyScroll();\n\t\t\t}));\n\t\t\tthis._enabled = true;\n\t\t}\n\n\t\tconst lineNumberOption = this._editor.getOption(EditorOption.lineNumbers);\n\t\tif (lineNumberOption.renderType === RenderLineNumbersType.Relative) {\n\t\t\tif (!this._cursorPositionListener) {\n\t\t\t\tthis._cursorPositionListener = this._editor.onDidChangeCursorPosition((e) => {\n\t\t\t\t\tif (this._positionLineNumber === e.position.lineNumber) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis._positionLineNumber = e.position.lineNumber;\n\t\t\t\t\tthis._showEndForLine = undefined;\n\t\t\t\t\tthis._renderStickyScroll(0);\n\t\t\t\t});\n\t\t\t\tthis._sessionStore.add(this._cursorPositionListener);\n\t\t\t}\n\t\t} else if (this._cursorPositionListener) {\n\t\t\tthis._sessionStore.delete(this._cursorPositionListener);\n\t\t\tthis._cursorPositionListener.dispose();\n\t\t\tthis._cursorPositionListener = undefined;\n\t\t}\n\t}\n\n\tprivate _readConfigurationChange(event: ConfigurationChangedEvent) {\n\t\tif (\n\t\t\tevent.hasChanged(EditorOption.stickyScroll)\n\t\t\t|| event.hasChanged(EditorOption.minimap)\n\t\t\t|| event.hasChanged(EditorOption.lineHeight)\n\t\t\t|| event.hasChanged(EditorOption.showFoldingControls)\n\t\t\t|| event.hasChanged(EditorOption.lineNumbers)\n\t\t) {\n\t\t\tthis._readConfiguration();\n\t\t}\n\n\t\tif (\n\t\t\tevent.hasChanged(EditorOption.lineNumbers)\n\t\t\t|| event.hasChanged(EditorOption.folding)\n\t\t\t|| event.hasChanged(EditorOption.showFoldingControls)\n\t\t\t|| event.hasChanged(EditorOption.fontInfo)\n\t\t\t|| event.hasChanged(EditorOption.effectiveFullwidthCharacterWidth)\n\t\t) {\n\t\t\tthis._renderStickyScroll(0);\n\t\t}\n\t}\n\n\tprivate _needsUpdate(event: IModelTokensChangedEvent) {\n\t\tconst stickyLineNumbers = this._stickyScrollWidget.getCurrentLines();\n\t\tfor (const stickyLineNumber of stickyLineNumbers) {\n\t\t\tfor (const range of event.ranges) {\n\t\t\t\tif (stickyLineNumber >= range.fromLineNumber && stickyLineNumber <= range.toLineNumber) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate _onTokensChange(event: IModelTokensChangedEvent) {\n\t\tif (this._needsUpdate(event)) {\n\t\t\t// Rebuilding the whole widget from line 0\n\t\t\tthis._renderStickyScroll(0);\n\t\t}\n\t}\n\n\tprivate _onDidResize() {\n\t\tconst layoutInfo = this._editor.getLayoutInfo();\n\t\t// Make sure sticky scroll doesn't take up more than 25% of the editor\n\t\tconst theoreticalLines = layoutInfo.height / this._editor.getOption(EditorOption.lineHeight);\n\t\tthis._maxStickyLines = Math.round(theoreticalLines * .25);\n\t\tthis._renderStickyScroll(0);\n\t}\n\n\tprivate async _renderStickyScroll(rebuildFromLine?: number): Promise<void> {\n\t\tconst model = this._editor.getModel();\n\t\tif (!model || model.isTooLargeForTokenization()) {\n\t\t\tthis._resetState();\n\t\t\treturn;\n\t\t}\n\t\tconst nextRebuildFromLine = this._updateAndGetMinRebuildFromLine(rebuildFromLine);\n\t\tconst stickyWidgetVersion = this._stickyLineCandidateProvider.getVersionId();\n\t\tconst shouldUpdateState = stickyWidgetVersion === undefined || stickyWidgetVersion === model.getVersionId();\n\t\tif (shouldUpdateState) {\n\t\t\tif (!this._focused) {\n\t\t\t\tawait this._updateState(nextRebuildFromLine);\n\t\t\t} else {\n\t\t\t\t// Suppose that previously the sticky scroll widget had height 0, then if there are visible lines, set the last line as focused\n\t\t\t\tif (this._focusedStickyElementIndex === -1) {\n\t\t\t\t\tawait this._updateState(nextRebuildFromLine);\n\t\t\t\t\tthis._focusedStickyElementIndex = this._stickyScrollWidget.lineNumberCount - 1;\n\t\t\t\t\tif (this._focusedStickyElementIndex !== -1) {\n\t\t\t\t\t\tthis._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tconst focusedStickyElementLineNumber = this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];\n\t\t\t\t\tawait this._updateState(nextRebuildFromLine);\n\t\t\t\t\t// Suppose that after setting the state, there are no sticky lines, set the focused index to -1\n\t\t\t\t\tif (this._stickyScrollWidget.lineNumberCount === 0) {\n\t\t\t\t\t\tthis._focusedStickyElementIndex = -1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst previousFocusedLineNumberExists = this._stickyScrollWidget.lineNumbers.includes(focusedStickyElementLineNumber);\n\n\t\t\t\t\t\t// If the line number is still there, do not change anything\n\t\t\t\t\t\t// If the line number is not there, set the new focused line to be the last line\n\t\t\t\t\t\tif (!previousFocusedLineNumberExists) {\n\t\t\t\t\t\t\tthis._focusedStickyElementIndex = this._stickyScrollWidget.lineNumberCount - 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _updateAndGetMinRebuildFromLine(rebuildFromLine: number | undefined): number | undefined {\n\t\tif (rebuildFromLine !== undefined) {\n\t\t\tconst minRebuildFromLineOrInfinity = this._minRebuildFromLine !== undefined ? this._minRebuildFromLine : Infinity;\n\t\t\tthis._minRebuildFromLine = Math.min(rebuildFromLine, minRebuildFromLineOrInfinity);\n\t\t}\n\t\treturn this._minRebuildFromLine;\n\t}\n\n\tprivate async _updateState(rebuildFromLine?: number): Promise<void> {\n\t\tthis._minRebuildFromLine = undefined;\n\t\tthis._foldingModel = await FoldingController.get(this._editor)?.getFoldingModel() ?? undefined;\n\t\tthis._widgetState = this.findScrollWidgetState();\n\t\tconst stickyWidgetHasLines = this._widgetState.startLineNumbers.length > 0;\n\t\tthis._stickyScrollVisibleContextKey.set(stickyWidgetHasLines);\n\t\tthis._stickyScrollWidget.setState(this._widgetState, this._foldingModel, rebuildFromLine);\n\t}\n\n\tprivate async _resetState(): Promise<void> {\n\t\tthis._minRebuildFromLine = undefined;\n\t\tthis._foldingModel = undefined;\n\t\tthis._widgetState = StickyScrollWidgetState.Empty;\n\t\tthis._stickyScrollVisibleContextKey.set(false);\n\t\tthis._stickyScrollWidget.setState(undefined, undefined);\n\t}\n\n\tfindScrollWidgetState(): StickyScrollWidgetState {\n\t\tconst maxNumberStickyLines = Math.min(this._maxStickyLines, this._editor.getOption(EditorOption.stickyScroll).maxLineCount);\n\t\tconst scrollTop: number = this._editor.getScrollTop();\n\t\tlet lastLineRelativePosition: number = 0;\n\t\tconst startLineNumbers: number[] = [];\n\t\tconst endLineNumbers: number[] = [];\n\t\tconst arrayVisibleRanges = this._editor.getVisibleRanges();\n\t\tif (arrayVisibleRanges.length !== 0) {\n\t\t\tconst fullVisibleRange = new StickyRange(arrayVisibleRanges[0].startLineNumber, arrayVisibleRanges[arrayVisibleRanges.length - 1].endLineNumber);\n\t\t\tconst candidateRanges = this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(fullVisibleRange);\n\t\t\tfor (const range of candidateRanges) {\n\t\t\t\tconst start = range.startLineNumber;\n\t\t\t\tconst end = range.endLineNumber;\n\t\t\t\tconst topOfElement = range.top;\n\t\t\t\tconst bottomOfElement = topOfElement + range.height;\n\t\t\t\tconst topOfBeginningLine = this._editor.getTopForLineNumber(start) - scrollTop;\n\t\t\t\tconst bottomOfEndLine = this._editor.getBottomForLineNumber(end) - scrollTop;\n\t\t\t\tif (topOfElement > topOfBeginningLine && topOfElement <= bottomOfEndLine) {\n\t\t\t\t\tstartLineNumbers.push(start);\n\t\t\t\t\tendLineNumbers.push(end + 1);\n\t\t\t\t\tif (bottomOfElement > bottomOfEndLine) {\n\t\t\t\t\t\tlastLineRelativePosition = bottomOfEndLine - bottomOfElement;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (startLineNumbers.length === maxNumberStickyLines) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis._endLineNumbers = endLineNumbers;\n\t\treturn new StickyScrollWidgetState(startLineNumbers, endLineNumbers, lastLineRelativePosition, this._showEndForLine);\n\t}\n\n\toverride dispose(): void {\n\t\tsuper.dispose();\n\t\tthis._sessionStore.dispose();\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 { IDisposable, Disposable, DisposableStore, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor, MouseTargetType } from '../../../browser/editorBrowser.js';\nimport { IEditorContribution, ScrollType } from '../../../common/editorCommon.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { EditorOption, RenderLineNumbersType, ConfigurationChangedEvent } from '../../../common/config/editorOptions.js';\nimport { StickyScrollWidget, StickyScrollWidgetState } from './stickyScrollWidget.js';\nimport { IStickyLineCandidateProvider, StickyLineCandidateProvider } from './stickyScrollProvider.js';\nimport { IModelTokensChangedEvent } from '../../../common/textModelEvents.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js';\nimport { MenuId } from '../../../../platform/actions/common/actions.js';\nimport { IContextKey, IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\nimport { ClickLinkGesture, ClickLinkMouseEvent } from '../../gotoSymbol/browser/link/clickLinkGesture.js';\nimport { IRange, Range } from '../../../common/core/range.js';\nimport { getDefinitionsAtPosition } from '../../gotoSymbol/browser/goToSymbol.js';\nimport { goToDefinitionWithLocation } from '../../inlayHints/browser/inlayHintsLocations.js';\nimport { IPosition, Position } from '../../../common/core/position.js';\nimport { CancellationTokenSource } from '../../../../base/common/cancellation.js';\nimport { ILanguageConfigurationService } from '../../../common/languages/languageConfigurationRegistry.js';\nimport { ILanguageFeatureDebounceService } from '../../../common/services/languageFeatureDebounce.js';\nimport * as dom from '../../../../base/browser/dom.js';\nimport { StickyRange } from './stickyScrollElement.js';\nimport { IMouseEvent, StandardMouseEvent } from '../../../../base/browser/mouseEvent.js';\nimport { FoldingController } from '../../folding/browser/folding.js';\nimport { FoldingModel, toggleCollapseState } from '../../folding/browser/foldingModel.js';\nimport { Emitter, Event } from '../../../../base/common/event.js';\nimport { mainWindow } from '../../../../base/browser/window.js';\n\nexport interface IStickyScrollController {\n\treadonly stickyScrollWidgetHeight: number;\n\tisFocused(): boolean;\n\tfocus(): void;\n\tfocusNext(): void;\n\tfocusPrevious(): void;\n\tgoToFocused(): void;\n\tdispose(): void;\n\tselectEditor(): void;\n\treadonly onDidChangeStickyScrollHeight: Event<{ height: number }>;\n}\n\nexport class StickyScrollController extends Disposable implements IEditorContribution, IStickyScrollController {\n\n\tstatic readonly ID = 'store.contrib.stickyScrollController';\n\n\tprivate readonly _stickyScrollWidget: StickyScrollWidget;\n\tprivate readonly _stickyLineCandidateProvider: IStickyLineCandidateProvider;\n\tprivate readonly _sessionStore: DisposableStore = new DisposableStore();\n\n\tprivate _widgetState: StickyScrollWidgetState;\n\tprivate _foldingModel: FoldingModel | undefined;\n\tprivate _maxStickyLines: number = Number.MAX_SAFE_INTEGER;\n\n\tprivate _stickyRangeProjectedOnEditor: IRange | undefined;\n\tprivate _candidateDefinitionsLength: number = -1;\n\n\tprivate _stickyScrollFocusedContextKey: IContextKey<boolean>;\n\tprivate _stickyScrollVisibleContextKey: IContextKey<boolean>;\n\n\tprivate _focusDisposableStore: DisposableStore | undefined;\n\tprivate _focusedStickyElementIndex: number = -1;\n\tprivate _enabled = false;\n\tprivate _focused = false;\n\tprivate _positionRevealed = false;\n\tprivate _onMouseDown = false;\n\tprivate _endLineNumbers: number[] = [];\n\tprivate _showEndForLine: number | undefined;\n\tprivate _minRebuildFromLine: number | undefined;\n\tprivate _mouseTarget: EventTarget | null = null;\n\tprivate _cursorPositionListener: IDisposable | undefined;\n\tprivate _positionLineNumber: number | undefined;\n\n\tprivate readonly _onDidChangeStickyScrollHeight = this._register(new Emitter<{ height: number }>());\n\tpublic readonly onDidChangeStickyScrollHeight = this._onDidChangeStickyScrollHeight.event;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@IContextMenuService private readonly _contextMenuService: IContextMenuService,\n\t\t@ILanguageFeaturesService private readonly _languageFeaturesService: ILanguageFeaturesService,\n\t\t@IInstantiationService private readonly _instaService: IInstantiationService,\n\t\t@ILanguageConfigurationService _languageConfigurationService: ILanguageConfigurationService,\n\t\t@ILanguageFeatureDebounceService _languageFeatureDebounceService: ILanguageFeatureDebounceService,\n\t\t@IContextKeyService private readonly _contextKeyService: IContextKeyService\n\t) {\n\t\tsuper();\n\t\tthis._stickyScrollWidget = new StickyScrollWidget(this._editor);\n\t\tthis._stickyLineCandidateProvider = new StickyLineCandidateProvider(this._editor, _languageFeaturesService, _languageConfigurationService);\n\t\tthis._register(this._stickyScrollWidget);\n\t\tthis._register(this._stickyLineCandidateProvider);\n\n\t\tthis._widgetState = StickyScrollWidgetState.Empty;\n\t\tconst stickyScrollDomNode = this._stickyScrollWidget.getDomNode();\n\t\tthis._register(this._editor.onDidChangeLineHeight((e) => {\n\t\t\te.changes.forEach((change) => {\n\t\t\t\tconst lineNumber = change.lineNumber;\n\t\t\t\tif (this._widgetState.startLineNumbers.includes(lineNumber)) {\n\t\t\t\t\tthis._renderStickyScroll(lineNumber);\n\t\t\t\t}\n\t\t\t});\n\t\t}));\n\t\tthis._register(this._editor.onDidChangeFont((e) => {\n\t\t\te.changes.forEach((change) => {\n\t\t\t\tconst lineNumber = change.lineNumber;\n\t\t\t\tif (this._widgetState.startLineNumbers.includes(lineNumber)) {\n\t\t\t\t\tthis._renderStickyScroll(lineNumber);\n\t\t\t\t}\n\t\t\t});\n\t\t}));\n\t\tthis._register(this._editor.onDidChangeConfiguration(e => {\n\t\t\tthis._readConfigurationChange(e);\n\t\t}));\n\t\tthis._register(dom.addDisposableListener(stickyScrollDomNode, dom.EventType.CONTEXT_MENU, async (event: MouseEvent) => {\n\t\t\tthis._onContextMenu(dom.getWindow(stickyScrollDomNode), event);\n\t\t}));\n\t\tthis._stickyScrollFocusedContextKey = EditorContextKeys.stickyScrollFocused.bindTo(this._contextKeyService);\n\t\tthis._stickyScrollVisibleContextKey = EditorContextKeys.stickyScrollVisible.bindTo(this._contextKeyService);\n\t\tconst focusTracker = this._register(dom.trackFocus(stickyScrollDomNode));\n\t\tthis._register(focusTracker.onDidBlur(_ => {\n\t\t\t// Suppose that the blurring is caused by scrolling, then keep the focus on the sticky scroll\n\t\t\t// This is determined by the fact that the height of the widget has become zero and there has been no position revealing\n\t\t\tif (this._positionRevealed === false && stickyScrollDomNode.clientHeight === 0) {\n\t\t\t\tthis._focusedStickyElementIndex = -1;\n\t\t\t\tthis.focus();\n\n\t\t\t}\n\t\t\t// In all other casees, dispose the focus on the sticky scroll\n\t\t\telse {\n\t\t\t\tthis._disposeFocusStickyScrollStore();\n\t\t\t}\n\t\t}));\n\t\tthis._register(focusTracker.onDidFocus(_ => {\n\t\t\tthis.focus();\n\t\t}));\n\t\tthis._registerMouseListeners();\n\t\t// Suppose that mouse down on the sticky scroll, then do not focus on the sticky scroll because this will be followed by the revealing of a position\n\t\tthis._register(dom.addDisposableListener(stickyScrollDomNode, dom.EventType.MOUSE_DOWN, (e) => {\n\t\t\tthis._onMouseDown = true;\n\t\t}));\n\t\tthis._register(this._stickyScrollWidget.onDidChangeStickyScrollHeight((e) => {\n\t\t\tthis._onDidChangeStickyScrollHeight.fire(e);\n\t\t}));\n\t\tthis._onDidResize();\n\t\tthis._readConfiguration();\n\t}\n\n\tget stickyScrollWidgetHeight(): number {\n\t\treturn this._stickyScrollWidget.height;\n\t}\n\n\tpublic static get(editor: ICodeEditor): IStickyScrollController | null {\n\t\treturn editor.getContribution<StickyScrollController>(StickyScrollController.ID);\n\t}\n\n\tprivate _disposeFocusStickyScrollStore() {\n\t\tthis._stickyScrollFocusedContextKey.set(false);\n\t\tthis._focusDisposableStore?.dispose();\n\t\tthis._focused = false;\n\t\tthis._positionRevealed = false;\n\t\tthis._onMouseDown = false;\n\t}\n\n\tpublic isFocused(): boolean {\n\t\treturn this._focused;\n\t}\n\n\tpublic focus(): void {\n\t\t// If the mouse is down, do not focus on the sticky scroll\n\t\tif (this._onMouseDown) {\n\t\t\tthis._onMouseDown = false;\n\t\t\tthis._editor.focus();\n\t\t\treturn;\n\t\t}\n\t\tconst focusState = this._stickyScrollFocusedContextKey.get();\n\t\tif (focusState === true) {\n\t\t\treturn;\n\t\t}\n\t\tthis._focused = true;\n\t\tthis._focusDisposableStore = new DisposableStore();\n\t\tthis._stickyScrollFocusedContextKey.set(true);\n\t\tthis._focusedStickyElementIndex = this._stickyScrollWidget.lineNumbers.length - 1;\n\t\tthis._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);\n\t}\n\n\tpublic focusNext(): void {\n\t\tif (this._focusedStickyElementIndex < this._stickyScrollWidget.lineNumberCount - 1) {\n\t\t\tthis._focusNav(true);\n\t\t}\n\t}\n\n\tpublic focusPrevious(): void {\n\t\tif (this._focusedStickyElementIndex > 0) {\n\t\t\tthis._focusNav(false);\n\t\t}\n\t}\n\n\tpublic selectEditor(): void {\n\t\tthis._editor.focus();\n\t}\n\n\t// True is next, false is previous\n\tprivate _focusNav(direction: boolean): void {\n\t\tthis._focusedStickyElementIndex = direction ? this._focusedStickyElementIndex + 1 : this._focusedStickyElementIndex - 1;\n\t\tthis._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);\n\t}\n\n\tpublic goToFocused(): void {\n\t\tconst lineNumbers = this._stickyScrollWidget.lineNumbers;\n\t\tthis._disposeFocusStickyScrollStore();\n\t\tthis._revealPosition({ lineNumber: lineNumbers[this._focusedStickyElementIndex], column: 1 });\n\t}\n\n\tprivate _revealPosition(position: IPosition): void {\n\t\tthis._reveaInEditor(position, () => this._editor.revealPosition(position));\n\t}\n\n\tprivate _revealLineInCenterIfOutsideViewport(position: IPosition): void {\n\t\tthis._reveaInEditor(position, () => this._editor.revealLineInCenterIfOutsideViewport(position.lineNumber, ScrollType.Smooth));\n\t}\n\n\tprivate _reveaInEditor(position: IPosition, revealFunction: () => void): void {\n\t\tif (this._focused) {\n\t\t\tthis._disposeFocusStickyScrollStore();\n\t\t}\n\t\tthis._positionRevealed = true;\n\t\trevealFunction();\n\t\tthis._editor.setSelection(Range.fromPositions(position));\n\t\tthis._editor.focus();\n\t}\n\n\tprivate _registerMouseListeners(): void {\n\n\t\tconst sessionStore = this._register(new DisposableStore());\n\t\tconst gesture = this._register(new ClickLinkGesture(this._editor, {\n\t\t\textractLineNumberFromMouseEvent: (e) => {\n\t\t\t\tconst position = this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);\n\t\t\t\treturn position ? position.lineNumber : 0;\n\t\t\t}\n\t\t}));\n\n\t\tconst getMouseEventTarget = (mouseEvent: ClickLinkMouseEvent): { range: Range; textElement: HTMLElement } | null => {\n\t\t\tif (!this._editor.hasModel()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tif (mouseEvent.target.type !== MouseTargetType.OVERLAY_WIDGET || mouseEvent.target.detail !== this._stickyScrollWidget.getId()) {\n\t\t\t\t// not hovering over our widget\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tconst mouseTargetElement = mouseEvent.target.element;\n\t\t\tif (!mouseTargetElement || mouseTargetElement.innerText !== mouseTargetElement.innerHTML) {\n\t\t\t\t// not on a span element rendering text\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tconst position = this._stickyScrollWidget.getEditorPositionFromNode(mouseTargetElement);\n\t\t\tif (!position) {\n\t\t\t\t// not hovering a sticky scroll line\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\trange: new Range(position.lineNumber, position.column, position.lineNumber, position.column + mouseTargetElement.innerText.length),\n\t\t\t\ttextElement: mouseTargetElement\n\t\t\t};\n\t\t};\n\n\t\tconst stickyScrollWidgetDomNode = this._stickyScrollWidget.getDomNode();\n\t\tthis._register(dom.addStandardDisposableListener(stickyScrollWidgetDomNode, dom.EventType.CLICK, (mouseEvent: IMouseEvent) => {\n\t\t\tif (mouseEvent.ctrlKey || mouseEvent.altKey || mouseEvent.metaKey) {\n\t\t\t\t// modifier pressed\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!mouseEvent.leftButton) {\n\t\t\t\t// not left click\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (mouseEvent.shiftKey) {\n\t\t\t\t// shift click\n\t\t\t\tconst lineIndex = this._stickyScrollWidget.getLineIndexFromChildDomNode(mouseEvent.target);\n\t\t\t\tif (lineIndex === null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst position = new Position(this._endLineNumbers[lineIndex], 1);\n\t\t\t\tthis._revealLineInCenterIfOutsideViewport(position);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst isInFoldingIconDomNode = this._stickyScrollWidget.isInFoldingIconDomNode(mouseEvent.target);\n\t\t\tif (isInFoldingIconDomNode) {\n\t\t\t\t// clicked on folding icon\n\t\t\t\tconst lineNumber = this._stickyScrollWidget.getLineNumberFromChildDomNode(mouseEvent.target);\n\t\t\t\tthis._toggleFoldingRegionForLine(lineNumber);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst isInStickyLine = this._stickyScrollWidget.isInStickyLine(mouseEvent.target);\n\t\t\tif (!isInStickyLine) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// normal click\n\t\t\tlet position = this._stickyScrollWidget.getEditorPositionFromNode(mouseEvent.target);\n\t\t\tif (!position) {\n\t\t\t\tconst lineNumber = this._stickyScrollWidget.getLineNumberFromChildDomNode(mouseEvent.target);\n\t\t\t\tif (lineNumber === null) {\n\t\t\t\t\t// not hovering a sticky scroll line\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tposition = new Position(lineNumber, 1);\n\t\t\t}\n\t\t\tthis._revealPosition(position);\n\t\t}));\n\t\tthis._register(dom.addDisposableListener(mainWindow, dom.EventType.MOUSE_MOVE, mouseEvent => {\n\t\t\tthis._mouseTarget = mouseEvent.target;\n\t\t\tthis._onMouseMoveOrKeyDown(mouseEvent);\n\t\t}));\n\t\tthis._register(dom.addDisposableListener(mainWindow, dom.EventType.KEY_DOWN, mouseEvent => {\n\t\t\tthis._onMouseMoveOrKeyDown(mouseEvent);\n\t\t}));\n\t\tthis._register(dom.addDisposableListener(mainWindow, dom.EventType.KEY_UP, () => {\n\t\t\tif (this._showEndForLine !== undefined) {\n\t\t\t\tthis._showEndForLine = undefined;\n\t\t\t\tthis._renderStickyScroll();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(gesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, _keyboardEvent]) => {\n\t\t\tconst mouseTarget = getMouseEventTarget(mouseEvent);\n\t\t\tif (!mouseTarget || !mouseEvent.hasTriggerModifier || !this._editor.hasModel()) {\n\t\t\t\tsessionStore.clear();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { range, textElement } = mouseTarget;\n\n\t\t\tif (!range.equalsRange(this._stickyRangeProjectedOnEditor)) {\n\t\t\t\tthis._stickyRangeProjectedOnEditor = range;\n\t\t\t\tsessionStore.clear();\n\t\t\t} else if (textElement.style.textDecoration === 'underline') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst cancellationToken = new CancellationTokenSource();\n\t\t\tsessionStore.add(toDisposable(() => cancellationToken.dispose(true)));\n\n\t\t\tlet currentHTMLChild: HTMLElement;\n\n\t\t\tgetDefinitionsAtPosition(this._languageFeaturesService.definitionProvider, this._editor.getModel(), new Position(range.startLineNumber, range.startColumn + 1), false, cancellationToken.token).then((candidateDefinitions => {\n\t\t\t\tif (cancellationToken.token.isCancellationRequested) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (candidateDefinitions.length !== 0) {\n\t\t\t\t\tthis._candidateDefinitionsLength = candidateDefinitions.length;\n\t\t\t\t\tconst childHTML: HTMLElement = textElement;\n\t\t\t\t\tif (currentHTMLChild !== childHTML) {\n\t\t\t\t\t\tsessionStore.clear();\n\t\t\t\t\t\tcurrentHTMLChild = childHTML;\n\t\t\t\t\t\tcurrentHTMLChild.style.textDecoration = 'underline';\n\t\t\t\t\t\tsessionStore.add(toDisposable(() => {\n\t\t\t\t\t\t\tcurrentHTMLChild.style.textDecoration = 'none';\n\t\t\t\t\t\t}));\n\t\t\t\t\t} else if (!currentHTMLChild) {\n\t\t\t\t\t\tcurrentHTMLChild = childHTML;\n\t\t\t\t\t\tcurrentHTMLChild.style.textDecoration = 'underline';\n\t\t\t\t\t\tsessionStore.add(toDisposable(() => {\n\t\t\t\t\t\t\tcurrentHTMLChild.style.textDecoration = 'none';\n\t\t\t\t\t\t}));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tsessionStore.clear();\n\t\t\t\t}\n\t\t\t}));\n\t\t}));\n\t\tthis._register(gesture.onCancel(() => {\n\t\t\tsessionStore.clear();\n\t\t}));\n\t\tthis._register(gesture.onExecute(async e => {\n\t\t\tif (e.target.type !== MouseTargetType.OVERLAY_WIDGET || e.target.detail !== this._stickyScrollWidget.getId()) {\n\t\t\t\t// not hovering over our widget\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst position = this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);\n\t\t\tif (!position) {\n\t\t\t\t// not hovering a sticky scroll line\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!this._editor.hasModel() || !this._stickyRangeProjectedOnEditor) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this._candidateDefinitionsLength > 1) {\n\t\t\t\tif (this._focused) {\n\t\t\t\t\tthis._disposeFocusStickyScrollStore();\n\t\t\t\t}\n\t\t\t\tthis._revealPosition({ lineNumber: position.lineNumber, column: 1 });\n\t\t\t}\n\t\t\tthis._instaService.invokeFunction(goToDefinitionWithLocation, e, this._editor, { uri: this._editor.getModel().uri, range: this._stickyRangeProjectedOnEditor });\n\t\t}));\n\t}\n\n\tprivate _onContextMenu(targetWindow: Window, e: MouseEvent) {\n\t\tconst event = new StandardMouseEvent(targetWindow, e);\n\n\t\tthis._contextMenuService.showContextMenu({\n\t\t\tmenuId: MenuId.StickyScrollContext,\n\t\t\tgetAnchor: () => event,\n\t\t\tmenuActionOptions: { renderShortTitle: true },\n\t\t});\n\t}\n\n\tprivate _onMouseMoveOrKeyDown(mouseEvent: KeyboardEvent | MouseEvent): void {\n\t\tif (!mouseEvent.shiftKey) {\n\t\t\treturn;\n\t\t}\n\t\tif (!this._mouseTarget || !dom.isHTMLElement(this._mouseTarget)) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentEndForLineIndex = this._stickyScrollWidget.getLineIndexFromChildDomNode(this._mouseTarget);\n\t\tif (currentEndForLineIndex === null || this._showEndForLine === currentEndForLineIndex) {\n\t\t\treturn;\n\t\t}\n\t\tthis._showEndForLine = currentEndForLineIndex;\n\t\tthis._renderStickyScroll();\n\t}\n\n\tprivate _toggleFoldingRegionForLine(line: number | null) {\n\t\tif (!this._foldingModel || line === null) {\n\t\t\treturn;\n\t\t}\n\t\tconst stickyLine = this._stickyScrollWidget.getRenderedStickyLine(line);\n\t\tconst foldingIcon = stickyLine?.foldingIcon;\n\t\tif (!foldingIcon) {\n\t\t\treturn;\n\t\t}\n\t\ttoggleCollapseState(this._foldingModel, 1, [line]);\n\t\tfoldingIcon.isCollapsed = !foldingIcon.isCollapsed;\n\t\tconst scrollTop = (foldingIcon.isCollapsed ?\n\t\t\tthis._editor.getTopForLineNumber(foldingIcon.foldingEndLine)\n\t\t\t: this._editor.getTopForLineNumber(foldingIcon.foldingStartLine))\n\t\t\t- this._editor.getOption(EditorOption.lineHeight) * stickyLine.index + 1;\n\t\tthis._editor.setScrollTop(scrollTop);\n\t\tthis._renderStickyScroll(line);\n\t}\n\n\tprivate _readConfiguration() {\n\t\tconst options = this._editor.getOption(EditorOption.stickyScroll);\n\t\tif (options.enabled === false) {\n\t\t\tthis._editor.removeOverlayWidget(this._stickyScrollWidget);\n\t\t\tthis._resetState();\n\t\t\tthis._sessionStore.clear();\n\t\t\tthis._enabled = false;\n\t\t\treturn;\n\t\t} else if (options.enabled && !this._enabled) {\n\t\t\t// When sticky scroll was just enabled, add the listeners on the sticky scroll\n\t\t\tthis._editor.addOverlayWidget(this._stickyScrollWidget);\n\t\t\tthis._sessionStore.add(this._editor.onDidScrollChange((e) => {\n\t\t\t\tif (e.scrollTopChanged) {\n\t\t\t\t\tthis._showEndForLine = undefined;\n\t\t\t\t\tthis._renderStickyScroll();\n\t\t\t\t}\n\t\t\t}));\n\t\t\tthis._sessionStore.add(this._editor.onDidLayoutChange(() => this._onDidResize()));\n\t\t\tthis._sessionStore.add(this._editor.onDidChangeModelTokens((e) => this._onTokensChange(e)));\n\t\t\tthis._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(() => {\n\t\t\t\tthis._showEndForLine = undefined;\n\t\t\t\tthis._renderStickyScroll();\n\t\t\t}));\n\t\t\tthis._enabled = true;\n\t\t}\n\n\t\tconst lineNumberOption = this._editor.getOption(EditorOption.lineNumbers);\n\t\tif (lineNumberOption.renderType === RenderLineNumbersType.Relative) {\n\t\t\tif (!this._cursorPositionListener) {\n\t\t\t\tthis._cursorPositionListener = this._editor.onDidChangeCursorPosition((e) => {\n\t\t\t\t\tif (this._positionLineNumber === e.position.lineNumber) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis._positionLineNumber = e.position.lineNumber;\n\t\t\t\t\tthis._showEndForLine = undefined;\n\t\t\t\t\tthis._renderStickyScroll(0);\n\t\t\t\t});\n\t\t\t\tthis._sessionStore.add(this._cursorPositionListener);\n\t\t\t}\n\t\t} else if (this._cursorPositionListener) {\n\t\t\tthis._sessionStore.delete(this._cursorPositionListener);\n\t\t\tthis._cursorPositionListener.dispose();\n\t\t\tthis._cursorPositionListener = undefined;\n\t\t}\n\t}\n\n\tprivate _readConfigurationChange(event: ConfigurationChangedEvent) {\n\t\tif (\n\t\t\tevent.hasChanged(EditorOption.stickyScroll)\n\t\t\t|| event.hasChanged(EditorOption.minimap)\n\t\t\t|| event.hasChanged(EditorOption.lineHeight)\n\t\t\t|| event.hasChanged(EditorOption.showFoldingControls)\n\t\t\t|| event.hasChanged(EditorOption.lineNumbers)\n\t\t) {\n\t\t\tthis._readConfiguration();\n\t\t}\n\n\t\tif (\n\t\t\tevent.hasChanged(EditorOption.lineNumbers)\n\t\t\t|| event.hasChanged(EditorOption.folding)\n\t\t\t|| event.hasChanged(EditorOption.showFoldingControls)\n\t\t\t|| event.hasChanged(EditorOption.fontInfo)\n\t\t\t|| event.hasChanged(EditorOption.effectiveFullwidthCharacterWidth)\n\t\t) {\n\t\t\tthis._renderStickyScroll(0);\n\t\t}\n\t}\n\n\tprivate _needsUpdate(event: IModelTokensChangedEvent) {\n\t\tconst stickyLineNumbers = this._stickyScrollWidget.getCurrentLines();\n\t\tfor (const stickyLineNumber of stickyLineNumbers) {\n\t\t\tfor (const range of event.ranges) {\n\t\t\t\tif (stickyLineNumber >= range.fromLineNumber && stickyLineNumber <= range.toLineNumber) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate _onTokensChange(event: IModelTokensChangedEvent) {\n\t\tif (this._needsUpdate(event)) {\n\t\t\t// Rebuilding the whole widget from line 0\n\t\t\tthis._renderStickyScroll(0);\n\t\t}\n\t}\n\n\tprivate _onDidResize() {\n\t\tconst layoutInfo = this._editor.getLayoutInfo();\n\t\t// Make sure sticky scroll doesn't take up more than 25% of the editor\n\t\tconst theoreticalLines = layoutInfo.height / this._editor.getOption(EditorOption.lineHeight);\n\t\tthis._maxStickyLines = Math.round(theoreticalLines * .25);\n\t\tthis._renderStickyScroll(0);\n\t}\n\n\tprivate async _renderStickyScroll(rebuildFromLine?: number): Promise<void> {\n\t\tconst model = this._editor.getModel();\n\t\tif (!model || model.isTooLargeForTokenization()) {\n\t\t\tthis._resetState();\n\t\t\treturn;\n\t\t}\n\t\tconst nextRebuildFromLine = this._updateAndGetMinRebuildFromLine(rebuildFromLine);\n\t\tconst stickyWidgetVersion = this._stickyLineCandidateProvider.getVersionId();\n\t\tconst shouldUpdateState = stickyWidgetVersion === undefined || stickyWidgetVersion === model.getVersionId();\n\t\tif (shouldUpdateState) {\n\t\t\tif (!this._focused) {\n\t\t\t\tawait this._updateState(nextRebuildFromLine);\n\t\t\t} else {\n\t\t\t\t// Suppose that previously the sticky scroll widget had height 0, then if there are visible lines, set the last line as focused\n\t\t\t\tif (this._focusedStickyElementIndex === -1) {\n\t\t\t\t\tawait this._updateState(nextRebuildFromLine);\n\t\t\t\t\tthis._focusedStickyElementIndex = this._stickyScrollWidget.lineNumberCount - 1;\n\t\t\t\t\tif (this._focusedStickyElementIndex !== -1) {\n\t\t\t\t\t\tthis._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tconst focusedStickyElementLineNumber = this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];\n\t\t\t\t\tawait this._updateState(nextRebuildFromLine);\n\t\t\t\t\t// Suppose that after setting the state, there are no sticky lines, set the focused index to -1\n\t\t\t\t\tif (this._stickyScrollWidget.lineNumberCount === 0) {\n\t\t\t\t\t\tthis._focusedStickyElementIndex = -1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst previousFocusedLineNumberExists = this._stickyScrollWidget.lineNumbers.includes(focusedStickyElementLineNumber);\n\n\t\t\t\t\t\t// If the line number is still there, do not change anything\n\t\t\t\t\t\t// If the line number is not there, set the new focused line to be the last line\n\t\t\t\t\t\tif (!previousFocusedLineNumberExists) {\n\t\t\t\t\t\t\tthis._focusedStickyElementIndex = this._stickyScrollWidget.lineNumberCount - 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _updateAndGetMinRebuildFromLine(rebuildFromLine: number | undefined): number | undefined {\n\t\tif (rebuildFromLine !== undefined) {\n\t\t\tconst minRebuildFromLineOrInfinity = this._minRebuildFromLine !== undefined ? this._minRebuildFromLine : Infinity;\n\t\t\tthis._minRebuildFromLine = Math.min(rebuildFromLine, minRebuildFromLineOrInfinity);\n\t\t}\n\t\treturn this._minRebuildFromLine;\n\t}\n\n\tprivate async _updateState(rebuildFromLine?: number): Promise<void> {\n\t\tthis._minRebuildFromLine = undefined;\n\t\tthis._foldingModel = await FoldingController.get(this._editor)?.getFoldingModel() ?? undefined;\n\t\tthis._widgetState = this.findScrollWidgetState();\n\t\tconst stickyWidgetHasLines = this._widgetState.startLineNumbers.length > 0;\n\t\tthis._stickyScrollVisibleContextKey.set(stickyWidgetHasLines);\n\t\tthis._stickyScrollWidget.setState(this._widgetState, this._foldingModel, rebuildFromLine);\n\t}\n\n\tprivate async _resetState(): Promise<void> {\n\t\tthis._minRebuildFromLine = undefined;\n\t\tthis._foldingModel = undefined;\n\t\tthis._widgetState = StickyScrollWidgetState.Empty;\n\t\tthis._stickyScrollVisibleContextKey.set(false);\n\t\tthis._stickyScrollWidget.setState(undefined, undefined);\n\t}\n\n\tfindScrollWidgetState(): StickyScrollWidgetState {\n\t\tconst maxNumberStickyLines = Math.min(this._maxStickyLines, this._editor.getOption(EditorOption.stickyScroll).maxLineCount);\n\t\tconst scrollTop: number = this._editor.getScrollTop();\n\t\tlet lastLineRelativePosition: number = 0;\n\t\tconst startLineNumbers: number[] = [];\n\t\tconst endLineNumbers: number[] = [];\n\t\tconst arrayVisibleRanges = this._editor.getVisibleRanges();\n\t\tif (arrayVisibleRanges.length !== 0) {\n\t\t\tconst fullVisibleRange = new StickyRange(arrayVisibleRanges[0].startLineNumber, arrayVisibleRanges[arrayVisibleRanges.length - 1].endLineNumber);\n\t\t\tconst candidateRanges = this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(fullVisibleRange);\n\t\t\tfor (const range of candidateRanges) {\n\t\t\t\tconst start = range.startLineNumber;\n\t\t\t\tconst end = range.endLineNumber;\n\t\t\t\tconst topOfElement = range.top;\n\t\t\t\tconst bottomOfElement = topOfElement + range.height;\n\t\t\t\tconst topOfBeginningLine = this._editor.getTopForLineNumber(start) - scrollTop;\n\t\t\t\tconst bottomOfEndLine = this._editor.getBottomForLineNumber(end) - scrollTop;\n\t\t\t\tif (topOfElement > topOfBeginningLine && topOfElement <= bottomOfEndLine) {\n\t\t\t\t\tstartLineNumbers.push(start);\n\t\t\t\t\tendLineNumbers.push(end + 1);\n\t\t\t\t\tif (bottomOfElement > bottomOfEndLine) {\n\t\t\t\t\t\tlastLineRelativePosition = bottomOfEndLine - bottomOfElement;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (startLineNumbers.length === maxNumberStickyLines) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis._endLineNumbers = endLineNumbers;\n\t\treturn new StickyScrollWidgetState(startLineNumbers, endLineNumbers, lastLineRelativePosition, this._showEndForLine);\n\t}\n\n\toverride dispose(): void {\n\t\tsuper.dispose();\n\t\tthis._sessionStore.dispose();\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/stickyScroll/browser/stickyScrollController.ts","vs/editor/contrib/stickyScroll/browser/stickyScrollController.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAEhG,OAAO,EAAe,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAG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CAAC,aAAa,CAAC,OAAO,EAAE,CAAC;IAC9B,CAAC;;AAllBW,sBAAsB;IAoChC,WAAA,mBAAmB,CAAA;IACnB,WAAA,wBAAwB,CAAA;IACxB,WAAA,qBAAqB,CAAA;IACrB,WAAA,6BAA6B,CAAA;IAC7B,WAAA,+BAA+B,CAAA;IAC/B,WAAA,kBAAkB,CAAA;GAzCR,sBAAsB,CAmlBlC","file":"stickyScrollController.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 { IDisposable, Disposable, DisposableStore, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor, MouseTargetType } from '../../../browser/editorBrowser.js';\nimport { IEditorContribution, ScrollType } from '../../../common/editorCommon.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { EditorOption, RenderLineNumbersType, ConfigurationChangedEvent } from '../../../common/config/editorOptions.js';\nimport { StickyScrollWidget, StickyScrollWidgetState } from './stickyScrollWidget.js';\nimport { IStickyLineCandidateProvider, StickyLineCandidateProvider } from './stickyScrollProvider.js';\nimport { IModelTokensChangedEvent } from '../../../common/textModelEvents.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js';\nimport { MenuId } from '../../../../platform/actions/common/actions.js';\nimport { IContextKey, IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\nimport { ClickLinkGesture, ClickLinkMouseEvent } from '../../gotoSymbol/browser/link/clickLinkGesture.js';\nimport { IRange, Range } from '../../../common/core/range.js';\nimport { getDefinitionsAtPosition } from '../../gotoSymbol/browser/goToSymbol.js';\nimport { goToDefinitionWithLocation } from '../../inlayHints/browser/inlayHintsLocations.js';\nimport { IPosition, Position } from '../../../common/core/position.js';\nimport { CancellationTokenSource } from '../../../../base/common/cancellation.js';\nimport { ILanguageConfigurationService } from '../../../common/languages/languageConfigurationRegistry.js';\nimport { ILanguageFeatureDebounceService } from '../../../common/services/languageFeatureDebounce.js';\nimport * as dom from '../../../../base/browser/dom.js';\nimport { StickyRange } from './stickyScrollElement.js';\nimport { IMouseEvent, StandardMouseEvent } from '../../../../base/browser/mouseEvent.js';\nimport { FoldingController } from '../../folding/browser/folding.js';\nimport { FoldingModel, toggleCollapseState } from '../../folding/browser/foldingModel.js';\nimport { Emitter, Event } from '../../../../base/common/event.js';\nimport { mainWindow } from '../../../../base/browser/window.js';\n\nexport interface IStickyScrollController {\n\treadonly stickyScrollWidgetHeight: number;\n\tisFocused(): boolean;\n\tfocus(): void;\n\tfocusNext(): void;\n\tfocusPrevious(): void;\n\tgoToFocused(): void;\n\tdispose(): void;\n\tselectEditor(): void;\n\treadonly onDidChangeStickyScrollHeight: Event<{ height: number }>;\n}\n\nexport class StickyScrollController extends Disposable implements IEditorContribution, IStickyScrollController {\n\n\tstatic readonly ID = 'store.contrib.stickyScrollController';\n\n\tprivate readonly _stickyScrollWidget: StickyScrollWidget;\n\tprivate readonly _stickyLineCandidateProvider: IStickyLineCandidateProvider;\n\tprivate readonly _sessionStore: DisposableStore = new DisposableStore();\n\n\tprivate _widgetState: StickyScrollWidgetState;\n\tprivate _foldingModel: FoldingModel | undefined;\n\tprivate _maxStickyLines: number = Number.MAX_SAFE_INTEGER;\n\n\tprivate _stickyRangeProjectedOnEditor: IRange | undefined;\n\tprivate _candidateDefinitionsLength: number = -1;\n\n\tprivate _stickyScrollFocusedContextKey: IContextKey<boolean>;\n\tprivate _stickyScrollVisibleContextKey: IContextKey<boolean>;\n\n\tprivate _focusDisposableStore: DisposableStore | undefined;\n\tprivate _focusedStickyElementIndex: number = -1;\n\tprivate _enabled = false;\n\tprivate _focused = false;\n\tprivate _positionRevealed = false;\n\tprivate _onMouseDown = false;\n\tprivate _endLineNumbers: number[] = [];\n\tprivate _showEndForLine: number | undefined;\n\tprivate _minRebuildFromLine: number | undefined;\n\tprivate _mouseTarget: EventTarget | null = null;\n\tprivate _cursorPositionListener: IDisposable | undefined;\n\tprivate _positionLineNumber: number | undefined;\n\n\tprivate readonly _onDidChangeStickyScrollHeight = this._register(new Emitter<{ height: number }>());\n\tpublic readonly onDidChangeStickyScrollHeight = this._onDidChangeStickyScrollHeight.event;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@IContextMenuService private readonly _contextMenuService: IContextMenuService,\n\t\t@ILanguageFeaturesService private readonly _languageFeaturesService: ILanguageFeaturesService,\n\t\t@IInstantiationService private readonly _instaService: IInstantiationService,\n\t\t@ILanguageConfigurationService _languageConfigurationService: ILanguageConfigurationService,\n\t\t@ILanguageFeatureDebounceService _languageFeatureDebounceService: ILanguageFeatureDebounceService,\n\t\t@IContextKeyService private readonly _contextKeyService: IContextKeyService\n\t) {\n\t\tsuper();\n\t\tthis._stickyScrollWidget = new StickyScrollWidget(this._editor);\n\t\tthis._stickyLineCandidateProvider = new StickyLineCandidateProvider(this._editor, _languageFeaturesService, _languageConfigurationService);\n\t\tthis._register(this._stickyScrollWidget);\n\t\tthis._register(this._stickyLineCandidateProvider);\n\n\t\tthis._widgetState = StickyScrollWidgetState.Empty;\n\t\tconst stickyScrollDomNode = this._stickyScrollWidget.getDomNode();\n\t\tthis._register(this._editor.onDidChangeLineHeight((e) => {\n\t\t\te.changes.forEach((change) => {\n\t\t\t\tconst lineNumber = change.lineNumber;\n\t\t\t\tif (this._widgetState.startLineNumbers.includes(lineNumber)) {\n\t\t\t\t\tthis._renderStickyScroll(lineNumber);\n\t\t\t\t}\n\t\t\t});\n\t\t}));\n\t\tthis._register(this._editor.onDidChangeFont((e) => {\n\t\t\te.changes.forEach((change) => {\n\t\t\t\tconst lineNumber = change.lineNumber;\n\t\t\t\tif (this._widgetState.startLineNumbers.includes(lineNumber)) {\n\t\t\t\t\tthis._renderStickyScroll(lineNumber);\n\t\t\t\t}\n\t\t\t});\n\t\t}));\n\t\tthis._register(this._editor.onDidChangeConfiguration(e => {\n\t\t\tthis._readConfigurationChange(e);\n\t\t}));\n\t\tthis._register(dom.addDisposableListener(stickyScrollDomNode, dom.EventType.CONTEXT_MENU, async (event: MouseEvent) => {\n\t\t\tthis._onContextMenu(dom.getWindow(stickyScrollDomNode), event);\n\t\t}));\n\t\tthis._stickyScrollFocusedContextKey = EditorContextKeys.stickyScrollFocused.bindTo(this._contextKeyService);\n\t\tthis._stickyScrollVisibleContextKey = EditorContextKeys.stickyScrollVisible.bindTo(this._contextKeyService);\n\t\tconst focusTracker = this._register(dom.trackFocus(stickyScrollDomNode));\n\t\tthis._register(focusTracker.onDidBlur(_ => {\n\t\t\t// Suppose that the blurring is caused by scrolling, then keep the focus on the sticky scroll\n\t\t\t// This is determined by the fact that the height of the widget has become zero and there has been no position revealing\n\t\t\tif (this._positionRevealed === false && stickyScrollDomNode.clientHeight === 0) {\n\t\t\t\tthis._focusedStickyElementIndex = -1;\n\t\t\t\tthis.focus();\n\n\t\t\t}\n\t\t\t// In all other casees, dispose the focus on the sticky scroll\n\t\t\telse {\n\t\t\t\tthis._disposeFocusStickyScrollStore();\n\t\t\t}\n\t\t}));\n\t\tthis._register(focusTracker.onDidFocus(_ => {\n\t\t\tthis.focus();\n\t\t}));\n\t\tthis._registerMouseListeners();\n\t\t// Suppose that mouse down on the sticky scroll, then do not focus on the sticky scroll because this will be followed by the revealing of a position\n\t\tthis._register(dom.addDisposableListener(stickyScrollDomNode, dom.EventType.MOUSE_DOWN, (e) => {\n\t\t\tthis._onMouseDown = true;\n\t\t}));\n\t\tthis._register(this._stickyScrollWidget.onDidChangeStickyScrollHeight((e) => {\n\t\t\tthis._onDidChangeStickyScrollHeight.fire(e);\n\t\t}));\n\t\tthis._onDidResize();\n\t\tthis._readConfiguration();\n\t}\n\n\tget stickyScrollWidgetHeight(): number {\n\t\treturn this._stickyScrollWidget.height;\n\t}\n\n\tpublic static get(editor: ICodeEditor): IStickyScrollController | null {\n\t\treturn editor.getContribution<StickyScrollController>(StickyScrollController.ID);\n\t}\n\n\tprivate _disposeFocusStickyScrollStore() {\n\t\tthis._stickyScrollFocusedContextKey.set(false);\n\t\tthis._focusDisposableStore?.dispose();\n\t\tthis._focused = false;\n\t\tthis._positionRevealed = false;\n\t\tthis._onMouseDown = false;\n\t}\n\n\tpublic isFocused(): boolean {\n\t\treturn this._focused;\n\t}\n\n\tpublic focus(): void {\n\t\t// If the mouse is down, do not focus on the sticky scroll\n\t\tif (this._onMouseDown) {\n\t\t\tthis._onMouseDown = false;\n\t\t\tthis._editor.focus();\n\t\t\treturn;\n\t\t}\n\t\tconst focusState = this._stickyScrollFocusedContextKey.get();\n\t\tif (focusState === true) {\n\t\t\treturn;\n\t\t}\n\t\tthis._focused = true;\n\t\tthis._focusDisposableStore = new DisposableStore();\n\t\tthis._stickyScrollFocusedContextKey.set(true);\n\t\tthis._focusedStickyElementIndex = this._stickyScrollWidget.lineNumbers.length - 1;\n\t\tthis._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);\n\t}\n\n\tpublic focusNext(): void {\n\t\tif (this._focusedStickyElementIndex < this._stickyScrollWidget.lineNumberCount - 1) {\n\t\t\tthis._focusNav(true);\n\t\t}\n\t}\n\n\tpublic focusPrevious(): void {\n\t\tif (this._focusedStickyElementIndex > 0) {\n\t\t\tthis._focusNav(false);\n\t\t}\n\t}\n\n\tpublic selectEditor(): void {\n\t\tthis._editor.focus();\n\t}\n\n\t// True is next, false is previous\n\tprivate _focusNav(direction: boolean): void {\n\t\tthis._focusedStickyElementIndex = direction ? this._focusedStickyElementIndex + 1 : this._focusedStickyElementIndex - 1;\n\t\tthis._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);\n\t}\n\n\tpublic goToFocused(): void {\n\t\tconst lineNumbers = this._stickyScrollWidget.lineNumbers;\n\t\tthis._disposeFocusStickyScrollStore();\n\t\tthis._revealPosition({ lineNumber: lineNumbers[this._focusedStickyElementIndex], column: 1 });\n\t}\n\n\tprivate _revealPosition(position: IPosition): void {\n\t\tthis._reveaInEditor(position, () => this._editor.revealPosition(position));\n\t}\n\n\tprivate _revealLineInCenterIfOutsideViewport(position: IPosition): void {\n\t\tthis._reveaInEditor(position, () => this._editor.revealLineInCenterIfOutsideViewport(position.lineNumber, ScrollType.Smooth));\n\t}\n\n\tprivate _reveaInEditor(position: IPosition, revealFunction: () => void): void {\n\t\tif (this._focused) {\n\t\t\tthis._disposeFocusStickyScrollStore();\n\t\t}\n\t\tthis._positionRevealed = true;\n\t\trevealFunction();\n\t\tthis._editor.setSelection(Range.fromPositions(position));\n\t\tthis._editor.focus();\n\t}\n\n\tprivate _registerMouseListeners(): void {\n\n\t\tconst sessionStore = this._register(new DisposableStore());\n\t\tconst gesture = this._register(new ClickLinkGesture(this._editor, {\n\t\t\textractLineNumberFromMouseEvent: (e) => {\n\t\t\t\tconst position = this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);\n\t\t\t\treturn position ? position.lineNumber : 0;\n\t\t\t}\n\t\t}));\n\n\t\tconst getMouseEventTarget = (mouseEvent: ClickLinkMouseEvent): { range: Range; textElement: HTMLElement } | null => {\n\t\t\tif (!this._editor.hasModel()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tif (mouseEvent.target.type !== MouseTargetType.OVERLAY_WIDGET || mouseEvent.target.detail !== this._stickyScrollWidget.getId()) {\n\t\t\t\t// not hovering over our widget\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tconst mouseTargetElement = mouseEvent.target.element;\n\t\t\tif (!mouseTargetElement || mouseTargetElement.innerText !== mouseTargetElement.innerHTML) {\n\t\t\t\t// not on a span element rendering text\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tconst position = this._stickyScrollWidget.getEditorPositionFromNode(mouseTargetElement);\n\t\t\tif (!position) {\n\t\t\t\t// not hovering a sticky scroll line\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\trange: new Range(position.lineNumber, position.column, position.lineNumber, position.column + mouseTargetElement.innerText.length),\n\t\t\t\ttextElement: mouseTargetElement\n\t\t\t};\n\t\t};\n\n\t\tconst stickyScrollWidgetDomNode = this._stickyScrollWidget.getDomNode();\n\t\tthis._register(dom.addStandardDisposableListener(stickyScrollWidgetDomNode, dom.EventType.CLICK, (mouseEvent: IMouseEvent) => {\n\t\t\tif (mouseEvent.ctrlKey || mouseEvent.altKey || mouseEvent.metaKey) {\n\t\t\t\t// modifier pressed\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!mouseEvent.leftButton) {\n\t\t\t\t// not left click\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (mouseEvent.shiftKey) {\n\t\t\t\t// shift click\n\t\t\t\tconst lineIndex = this._stickyScrollWidget.getLineIndexFromChildDomNode(mouseEvent.target);\n\t\t\t\tif (lineIndex === null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst position = new Position(this._endLineNumbers[lineIndex], 1);\n\t\t\t\tthis._revealLineInCenterIfOutsideViewport(position);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst isInFoldingIconDomNode = this._stickyScrollWidget.isInFoldingIconDomNode(mouseEvent.target);\n\t\t\tif (isInFoldingIconDomNode) {\n\t\t\t\t// clicked on folding icon\n\t\t\t\tconst lineNumber = this._stickyScrollWidget.getLineNumberFromChildDomNode(mouseEvent.target);\n\t\t\t\tthis._toggleFoldingRegionForLine(lineNumber);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst isInStickyLine = this._stickyScrollWidget.isInStickyLine(mouseEvent.target);\n\t\t\tif (!isInStickyLine) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// normal click\n\t\t\tlet position = this._stickyScrollWidget.getEditorPositionFromNode(mouseEvent.target);\n\t\t\tif (!position) {\n\t\t\t\tconst lineNumber = this._stickyScrollWidget.getLineNumberFromChildDomNode(mouseEvent.target);\n\t\t\t\tif (lineNumber === null) {\n\t\t\t\t\t// not hovering a sticky scroll line\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tposition = new Position(lineNumber, 1);\n\t\t\t}\n\t\t\tthis._revealPosition(position);\n\t\t}));\n\t\tthis._register(dom.addDisposableListener(mainWindow, dom.EventType.MOUSE_MOVE, mouseEvent => {\n\t\t\t// Only remember targets inside the widget to not retain arbitrary, later detached, DOM (#146841)\n\t\t\tconst target = mouseEvent.target;\n\t\t\tthis._mouseTarget = dom.isHTMLElement(target) && this._stickyScrollWidget.getDomNode().contains(target) ? target : null;\n\t\t\tthis._onMouseMoveOrKeyDown(mouseEvent);\n\t\t}));\n\t\tthis._register(dom.addDisposableListener(mainWindow, dom.EventType.KEY_DOWN, mouseEvent => {\n\t\t\tthis._onMouseMoveOrKeyDown(mouseEvent);\n\t\t}));\n\t\tthis._register(dom.addDisposableListener(mainWindow, dom.EventType.KEY_UP, () => {\n\t\t\tif (this._showEndForLine !== undefined) {\n\t\t\t\tthis._showEndForLine = undefined;\n\t\t\t\tthis._renderStickyScroll();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(gesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, _keyboardEvent]) => {\n\t\t\tconst mouseTarget = getMouseEventTarget(mouseEvent);\n\t\t\tif (!mouseTarget || !mouseEvent.hasTriggerModifier || !this._editor.hasModel()) {\n\t\t\t\tsessionStore.clear();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { range, textElement } = mouseTarget;\n\n\t\t\tif (!range.equalsRange(this._stickyRangeProjectedOnEditor)) {\n\t\t\t\tthis._stickyRangeProjectedOnEditor = range;\n\t\t\t\tsessionStore.clear();\n\t\t\t} else if (textElement.style.textDecoration === 'underline') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst cancellationToken = new CancellationTokenSource();\n\t\t\tsessionStore.add(toDisposable(() => cancellationToken.dispose(true)));\n\n\t\t\tlet currentHTMLChild: HTMLElement;\n\n\t\t\tgetDefinitionsAtPosition(this._languageFeaturesService.definitionProvider, this._editor.getModel(), new Position(range.startLineNumber, range.startColumn + 1), false, cancellationToken.token).then((candidateDefinitions => {\n\t\t\t\tif (cancellationToken.token.isCancellationRequested) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (candidateDefinitions.length !== 0) {\n\t\t\t\t\tthis._candidateDefinitionsLength = candidateDefinitions.length;\n\t\t\t\t\tconst childHTML: HTMLElement = textElement;\n\t\t\t\t\tif (currentHTMLChild !== childHTML) {\n\t\t\t\t\t\tsessionStore.clear();\n\t\t\t\t\t\tcurrentHTMLChild = childHTML;\n\t\t\t\t\t\tcurrentHTMLChild.style.textDecoration = 'underline';\n\t\t\t\t\t\tsessionStore.add(toDisposable(() => {\n\t\t\t\t\t\t\tcurrentHTMLChild.style.textDecoration = 'none';\n\t\t\t\t\t\t}));\n\t\t\t\t\t} else if (!currentHTMLChild) {\n\t\t\t\t\t\tcurrentHTMLChild = childHTML;\n\t\t\t\t\t\tcurrentHTMLChild.style.textDecoration = 'underline';\n\t\t\t\t\t\tsessionStore.add(toDisposable(() => {\n\t\t\t\t\t\t\tcurrentHTMLChild.style.textDecoration = 'none';\n\t\t\t\t\t\t}));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tsessionStore.clear();\n\t\t\t\t}\n\t\t\t}));\n\t\t}));\n\t\tthis._register(gesture.onCancel(() => {\n\t\t\tsessionStore.clear();\n\t\t}));\n\t\tthis._register(gesture.onExecute(async e => {\n\t\t\tif (e.target.type !== MouseTargetType.OVERLAY_WIDGET || e.target.detail !== this._stickyScrollWidget.getId()) {\n\t\t\t\t// not hovering over our widget\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst position = this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);\n\t\t\tif (!position) {\n\t\t\t\t// not hovering a sticky scroll line\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!this._editor.hasModel() || !this._stickyRangeProjectedOnEditor) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this._candidateDefinitionsLength > 1) {\n\t\t\t\tif (this._focused) {\n\t\t\t\t\tthis._disposeFocusStickyScrollStore();\n\t\t\t\t}\n\t\t\t\tthis._revealPosition({ lineNumber: position.lineNumber, column: 1 });\n\t\t\t}\n\t\t\tthis._instaService.invokeFunction(goToDefinitionWithLocation, e, this._editor, { uri: this._editor.getModel().uri, range: this._stickyRangeProjectedOnEditor });\n\t\t}));\n\t}\n\n\tprivate _onContextMenu(targetWindow: Window, e: MouseEvent) {\n\t\tconst event = new StandardMouseEvent(targetWindow, e);\n\n\t\tthis._contextMenuService.showContextMenu({\n\t\t\tmenuId: MenuId.StickyScrollContext,\n\t\t\tgetAnchor: () => event,\n\t\t\tmenuActionOptions: { renderShortTitle: true },\n\t\t});\n\t}\n\n\tprivate _onMouseMoveOrKeyDown(mouseEvent: KeyboardEvent | MouseEvent): void {\n\t\tif (!mouseEvent.shiftKey) {\n\t\t\treturn;\n\t\t}\n\t\tif (!this._mouseTarget || !dom.isHTMLElement(this._mouseTarget)) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentEndForLineIndex = this._stickyScrollWidget.getLineIndexFromChildDomNode(this._mouseTarget);\n\t\tif (currentEndForLineIndex === null || this._showEndForLine === currentEndForLineIndex) {\n\t\t\treturn;\n\t\t}\n\t\tthis._showEndForLine = currentEndForLineIndex;\n\t\tthis._renderStickyScroll();\n\t}\n\n\tprivate _toggleFoldingRegionForLine(line: number | null) {\n\t\tif (!this._foldingModel || line === null) {\n\t\t\treturn;\n\t\t}\n\t\tconst stickyLine = this._stickyScrollWidget.getRenderedStickyLine(line);\n\t\tconst foldingIcon = stickyLine?.foldingIcon;\n\t\tif (!foldingIcon) {\n\t\t\treturn;\n\t\t}\n\t\ttoggleCollapseState(this._foldingModel, 1, [line]);\n\t\tfoldingIcon.isCollapsed = !foldingIcon.isCollapsed;\n\t\tconst scrollTop = (foldingIcon.isCollapsed ?\n\t\t\tthis._editor.getTopForLineNumber(foldingIcon.foldingEndLine)\n\t\t\t: this._editor.getTopForLineNumber(foldingIcon.foldingStartLine))\n\t\t\t- this._editor.getOption(EditorOption.lineHeight) * stickyLine.index + 1;\n\t\tthis._editor.setScrollTop(scrollTop);\n\t\tthis._renderStickyScroll(line);\n\t}\n\n\tprivate _readConfiguration() {\n\t\tconst options = this._editor.getOption(EditorOption.stickyScroll);\n\t\tif (options.enabled === false) {\n\t\t\tthis._editor.removeOverlayWidget(this._stickyScrollWidget);\n\t\t\tthis._resetState();\n\t\t\tthis._sessionStore.clear();\n\t\t\tthis._enabled = false;\n\t\t\treturn;\n\t\t} else if (options.enabled && !this._enabled) {\n\t\t\t// When sticky scroll was just enabled, add the listeners on the sticky scroll\n\t\t\tthis._editor.addOverlayWidget(this._stickyScrollWidget);\n\t\t\tthis._sessionStore.add(this._editor.onDidScrollChange((e) => {\n\t\t\t\tif (e.scrollTopChanged) {\n\t\t\t\t\tthis._showEndForLine = undefined;\n\t\t\t\t\tthis._renderStickyScroll();\n\t\t\t\t}\n\t\t\t}));\n\t\t\tthis._sessionStore.add(this._editor.onDidLayoutChange(() => this._onDidResize()));\n\t\t\tthis._sessionStore.add(this._editor.onDidChangeModelTokens((e) => this._onTokensChange(e)));\n\t\t\tthis._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(() => {\n\t\t\t\tthis._showEndForLine = undefined;\n\t\t\t\tthis._renderStickyScroll();\n\t\t\t}));\n\t\t\tthis._enabled = true;\n\t\t}\n\n\t\tconst lineNumberOption = this._editor.getOption(EditorOption.lineNumbers);\n\t\tif (lineNumberOption.renderType === RenderLineNumbersType.Relative) {\n\t\t\tif (!this._cursorPositionListener) {\n\t\t\t\tthis._cursorPositionListener = this._editor.onDidChangeCursorPosition((e) => {\n\t\t\t\t\tif (this._positionLineNumber === e.position.lineNumber) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis._positionLineNumber = e.position.lineNumber;\n\t\t\t\t\tthis._showEndForLine = undefined;\n\t\t\t\t\tthis._renderStickyScroll(0);\n\t\t\t\t});\n\t\t\t\tthis._sessionStore.add(this._cursorPositionListener);\n\t\t\t}\n\t\t} else if (this._cursorPositionListener) {\n\t\t\tthis._sessionStore.delete(this._cursorPositionListener);\n\t\t\tthis._cursorPositionListener.dispose();\n\t\t\tthis._cursorPositionListener = undefined;\n\t\t}\n\t}\n\n\tprivate _readConfigurationChange(event: ConfigurationChangedEvent) {\n\t\tif (\n\t\t\tevent.hasChanged(EditorOption.stickyScroll)\n\t\t\t|| event.hasChanged(EditorOption.minimap)\n\t\t\t|| event.hasChanged(EditorOption.lineHeight)\n\t\t\t|| event.hasChanged(EditorOption.showFoldingControls)\n\t\t\t|| event.hasChanged(EditorOption.lineNumbers)\n\t\t) {\n\t\t\tthis._readConfiguration();\n\t\t}\n\n\t\tif (\n\t\t\tevent.hasChanged(EditorOption.lineNumbers)\n\t\t\t|| event.hasChanged(EditorOption.folding)\n\t\t\t|| event.hasChanged(EditorOption.showFoldingControls)\n\t\t\t|| event.hasChanged(EditorOption.fontInfo)\n\t\t\t|| event.hasChanged(EditorOption.effectiveFullwidthCharacterWidth)\n\t\t) {\n\t\t\tthis._renderStickyScroll(0);\n\t\t}\n\t}\n\n\tprivate _needsUpdate(event: IModelTokensChangedEvent) {\n\t\tconst stickyLineNumbers = this._stickyScrollWidget.getCurrentLines();\n\t\tfor (const stickyLineNumber of stickyLineNumbers) {\n\t\t\tfor (const range of event.ranges) {\n\t\t\t\tif (stickyLineNumber >= range.fromLineNumber && stickyLineNumber <= range.toLineNumber) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate _onTokensChange(event: IModelTokensChangedEvent) {\n\t\tif (this._needsUpdate(event)) {\n\t\t\t// Rebuilding the whole widget from line 0\n\t\t\tthis._renderStickyScroll(0);\n\t\t}\n\t}\n\n\tprivate _onDidResize() {\n\t\tconst layoutInfo = this._editor.getLayoutInfo();\n\t\t// Make sure sticky scroll doesn't take up more than 25% of the editor\n\t\tconst theoreticalLines = layoutInfo.height / this._editor.getOption(EditorOption.lineHeight);\n\t\tthis._maxStickyLines = Math.round(theoreticalLines * .25);\n\t\tthis._renderStickyScroll(0);\n\t}\n\n\tprivate async _renderStickyScroll(rebuildFromLine?: number): Promise<void> {\n\t\tconst model = this._editor.getModel();\n\t\tif (!model || model.isTooLargeForTokenization()) {\n\t\t\tthis._resetState();\n\t\t\treturn;\n\t\t}\n\t\tconst nextRebuildFromLine = this._updateAndGetMinRebuildFromLine(rebuildFromLine);\n\t\tconst stickyWidgetVersion = this._stickyLineCandidateProvider.getVersionId();\n\t\tconst shouldUpdateState = stickyWidgetVersion === undefined || stickyWidgetVersion === model.getVersionId();\n\t\tif (shouldUpdateState) {\n\t\t\tif (!this._focused) {\n\t\t\t\tawait this._updateState(nextRebuildFromLine);\n\t\t\t} else {\n\t\t\t\t// Suppose that previously the sticky scroll widget had height 0, then if there are visible lines, set the last line as focused\n\t\t\t\tif (this._focusedStickyElementIndex === -1) {\n\t\t\t\t\tawait this._updateState(nextRebuildFromLine);\n\t\t\t\t\tthis._focusedStickyElementIndex = this._stickyScrollWidget.lineNumberCount - 1;\n\t\t\t\t\tif (this._focusedStickyElementIndex !== -1) {\n\t\t\t\t\t\tthis._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tconst focusedStickyElementLineNumber = this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];\n\t\t\t\t\tawait this._updateState(nextRebuildFromLine);\n\t\t\t\t\t// Suppose that after setting the state, there are no sticky lines, set the focused index to -1\n\t\t\t\t\tif (this._stickyScrollWidget.lineNumberCount === 0) {\n\t\t\t\t\t\tthis._focusedStickyElementIndex = -1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst previousFocusedLineNumberExists = this._stickyScrollWidget.lineNumbers.includes(focusedStickyElementLineNumber);\n\n\t\t\t\t\t\t// If the line number is still there, do not change anything\n\t\t\t\t\t\t// If the line number is not there, set the new focused line to be the last line\n\t\t\t\t\t\tif (!previousFocusedLineNumberExists) {\n\t\t\t\t\t\t\tthis._focusedStickyElementIndex = this._stickyScrollWidget.lineNumberCount - 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _updateAndGetMinRebuildFromLine(rebuildFromLine: number | undefined): number | undefined {\n\t\tif (rebuildFromLine !== undefined) {\n\t\t\tconst minRebuildFromLineOrInfinity = this._minRebuildFromLine !== undefined ? this._minRebuildFromLine : Infinity;\n\t\t\tthis._minRebuildFromLine = Math.min(rebuildFromLine, minRebuildFromLineOrInfinity);\n\t\t}\n\t\treturn this._minRebuildFromLine;\n\t}\n\n\tprivate async _updateState(rebuildFromLine?: number): Promise<void> {\n\t\tthis._minRebuildFromLine = undefined;\n\t\tthis._foldingModel = await FoldingController.get(this._editor)?.getFoldingModel() ?? undefined;\n\t\tthis._widgetState = this.findScrollWidgetState();\n\t\tconst stickyWidgetHasLines = this._widgetState.startLineNumbers.length > 0;\n\t\tthis._stickyScrollVisibleContextKey.set(stickyWidgetHasLines);\n\t\tthis._stickyScrollWidget.setState(this._widgetState, this._foldingModel, rebuildFromLine);\n\t}\n\n\tprivate async _resetState(): Promise<void> {\n\t\tthis._minRebuildFromLine = undefined;\n\t\tthis._foldingModel = undefined;\n\t\tthis._widgetState = StickyScrollWidgetState.Empty;\n\t\tthis._stickyScrollVisibleContextKey.set(false);\n\t\tthis._stickyScrollWidget.setState(undefined, undefined);\n\t}\n\n\tfindScrollWidgetState(): StickyScrollWidgetState {\n\t\tconst maxNumberStickyLines = Math.min(this._maxStickyLines, this._editor.getOption(EditorOption.stickyScroll).maxLineCount);\n\t\tconst scrollTop: number = this._editor.getScrollTop();\n\t\tlet lastLineRelativePosition: number = 0;\n\t\tconst startLineNumbers: number[] = [];\n\t\tconst endLineNumbers: number[] = [];\n\t\tconst arrayVisibleRanges = this._editor.getVisibleRanges();\n\t\tif (arrayVisibleRanges.length !== 0) {\n\t\t\tconst fullVisibleRange = new StickyRange(arrayVisibleRanges[0].startLineNumber, arrayVisibleRanges[arrayVisibleRanges.length - 1].endLineNumber);\n\t\t\tconst candidateRanges = this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(fullVisibleRange);\n\t\t\tfor (const range of candidateRanges) {\n\t\t\t\tconst start = range.startLineNumber;\n\t\t\t\tconst end = range.endLineNumber;\n\t\t\t\tconst topOfElement = range.top;\n\t\t\t\tconst bottomOfElement = topOfElement + range.height;\n\t\t\t\tconst topOfBeginningLine = this._editor.getTopForLineNumber(start) - scrollTop;\n\t\t\t\tconst bottomOfEndLine = this._editor.getBottomForLineNumber(end) - scrollTop;\n\t\t\t\tif (topOfElement > topOfBeginningLine && topOfElement <= bottomOfEndLine) {\n\t\t\t\t\tstartLineNumbers.push(start);\n\t\t\t\t\tendLineNumbers.push(end + 1);\n\t\t\t\t\tif (bottomOfElement > bottomOfEndLine) {\n\t\t\t\t\t\tlastLineRelativePosition = bottomOfEndLine - bottomOfElement;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (startLineNumbers.length === maxNumberStickyLines) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis._endLineNumbers = endLineNumbers;\n\t\treturn new StickyScrollWidgetState(startLineNumbers, endLineNumbers, lastLineRelativePosition, this._showEndForLine);\n\t}\n\n\toverride dispose(): void {\n\t\tsuper.dispose();\n\t\tthis._sessionStore.dispose();\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 { IDisposable, Disposable, DisposableStore, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { ICodeEditor, MouseTargetType } from '../../../browser/editorBrowser.js';\nimport { IEditorContribution, ScrollType } from '../../../common/editorCommon.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { EditorOption, RenderLineNumbersType, ConfigurationChangedEvent } from '../../../common/config/editorOptions.js';\nimport { StickyScrollWidget, StickyScrollWidgetState } from './stickyScrollWidget.js';\nimport { IStickyLineCandidateProvider, StickyLineCandidateProvider } from './stickyScrollProvider.js';\nimport { IModelTokensChangedEvent } from '../../../common/textModelEvents.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js';\nimport { MenuId } from '../../../../platform/actions/common/actions.js';\nimport { IContextKey, IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\nimport { ClickLinkGesture, ClickLinkMouseEvent } from '../../gotoSymbol/browser/link/clickLinkGesture.js';\nimport { IRange, Range } from '../../../common/core/range.js';\nimport { getDefinitionsAtPosition } from '../../gotoSymbol/browser/goToSymbol.js';\nimport { goToDefinitionWithLocation } from '../../inlayHints/browser/inlayHintsLocations.js';\nimport { IPosition, Position } from '../../../common/core/position.js';\nimport { CancellationTokenSource } from '../../../../base/common/cancellation.js';\nimport { ILanguageConfigurationService } from '../../../common/languages/languageConfigurationRegistry.js';\nimport { ILanguageFeatureDebounceService } from '../../../common/services/languageFeatureDebounce.js';\nimport * as dom from '../../../../base/browser/dom.js';\nimport { StickyRange } from './stickyScrollElement.js';\nimport { IMouseEvent, StandardMouseEvent } from '../../../../base/browser/mouseEvent.js';\nimport { FoldingController } from '../../folding/browser/folding.js';\nimport { FoldingModel, toggleCollapseState } from '../../folding/browser/foldingModel.js';\nimport { Emitter, Event } from '../../../../base/common/event.js';\nimport { mainWindow } from '../../../../base/browser/window.js';\n\nexport interface IStickyScrollController {\n\treadonly stickyScrollWidgetHeight: number;\n\tisFocused(): boolean;\n\tfocus(): void;\n\tfocusNext(): void;\n\tfocusPrevious(): void;\n\tgoToFocused(): void;\n\tdispose(): void;\n\tselectEditor(): void;\n\treadonly onDidChangeStickyScrollHeight: Event<{ height: number }>;\n}\n\nexport class StickyScrollController extends Disposable implements IEditorContribution, IStickyScrollController {\n\n\tstatic readonly ID = 'store.contrib.stickyScrollController';\n\n\tprivate readonly _stickyScrollWidget: StickyScrollWidget;\n\tprivate readonly _stickyLineCandidateProvider: IStickyLineCandidateProvider;\n\tprivate readonly _sessionStore: DisposableStore = new DisposableStore();\n\n\tprivate _widgetState: StickyScrollWidgetState;\n\tprivate _foldingModel: FoldingModel | undefined;\n\tprivate _maxStickyLines: number = Number.MAX_SAFE_INTEGER;\n\n\tprivate _stickyRangeProjectedOnEditor: IRange | undefined;\n\tprivate _candidateDefinitionsLength: number = -1;\n\n\tprivate _stickyScrollFocusedContextKey: IContextKey<boolean>;\n\tprivate _stickyScrollVisibleContextKey: IContextKey<boolean>;\n\n\tprivate _focusDisposableStore: DisposableStore | undefined;\n\tprivate _focusedStickyElementIndex: number = -1;\n\tprivate _enabled = false;\n\tprivate _focused = false;\n\tprivate _positionRevealed = false;\n\tprivate _onMouseDown = false;\n\tprivate _endLineNumbers: number[] = [];\n\tprivate _showEndForLine: number | undefined;\n\tprivate _minRebuildFromLine: number | undefined;\n\tprivate _mouseTarget: EventTarget | null = null;\n\tprivate _cursorPositionListener: IDisposable | undefined;\n\tprivate _positionLineNumber: number | undefined;\n\n\tprivate readonly _onDidChangeStickyScrollHeight = this._register(new Emitter<{ height: number }>());\n\tpublic readonly onDidChangeStickyScrollHeight = this._onDidChangeStickyScrollHeight.event;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@IContextMenuService private readonly _contextMenuService: IContextMenuService,\n\t\t@ILanguageFeaturesService private readonly _languageFeaturesService: ILanguageFeaturesService,\n\t\t@IInstantiationService private readonly _instaService: IInstantiationService,\n\t\t@ILanguageConfigurationService _languageConfigurationService: ILanguageConfigurationService,\n\t\t@ILanguageFeatureDebounceService _languageFeatureDebounceService: ILanguageFeatureDebounceService,\n\t\t@IContextKeyService private readonly _contextKeyService: IContextKeyService\n\t) {\n\t\tsuper();\n\t\tthis._stickyScrollWidget = new StickyScrollWidget(this._editor);\n\t\tthis._stickyLineCandidateProvider = new StickyLineCandidateProvider(this._editor, _languageFeaturesService, _languageConfigurationService);\n\t\tthis._register(this._stickyScrollWidget);\n\t\tthis._register(this._stickyLineCandidateProvider);\n\n\t\tthis._widgetState = StickyScrollWidgetState.Empty;\n\t\tconst stickyScrollDomNode = this._stickyScrollWidget.getDomNode();\n\t\tthis._register(this._editor.onDidChangeLineHeight((e) => {\n\t\t\te.changes.forEach((change) => {\n\t\t\t\tconst lineNumber = change.lineNumber;\n\t\t\t\tif (this._widgetState.startLineNumbers.includes(lineNumber)) {\n\t\t\t\t\tthis._renderStickyScroll(lineNumber);\n\t\t\t\t}\n\t\t\t});\n\t\t}));\n\t\tthis._register(this._editor.onDidChangeFont((e) => {\n\t\t\te.changes.forEach((change) => {\n\t\t\t\tconst lineNumber = change.lineNumber;\n\t\t\t\tif (this._widgetState.startLineNumbers.includes(lineNumber)) {\n\t\t\t\t\tthis._renderStickyScroll(lineNumber);\n\t\t\t\t}\n\t\t\t});\n\t\t}));\n\t\tthis._register(this._editor.onDidChangeConfiguration(e => {\n\t\t\tthis._readConfigurationChange(e);\n\t\t}));\n\t\tthis._register(dom.addDisposableListener(stickyScrollDomNode, dom.EventType.CONTEXT_MENU, async (event: MouseEvent) => {\n\t\t\tthis._onContextMenu(dom.getWindow(stickyScrollDomNode), event);\n\t\t}));\n\t\tthis._stickyScrollFocusedContextKey = EditorContextKeys.stickyScrollFocused.bindTo(this._contextKeyService);\n\t\tthis._stickyScrollVisibleContextKey = EditorContextKeys.stickyScrollVisible.bindTo(this._contextKeyService);\n\t\tconst focusTracker = this._register(dom.trackFocus(stickyScrollDomNode));\n\t\tthis._register(focusTracker.onDidBlur(_ => {\n\t\t\t// Suppose that the blurring is caused by scrolling, then keep the focus on the sticky scroll\n\t\t\t// This is determined by the fact that the height of the widget has become zero and there has been no position revealing\n\t\t\tif (this._positionRevealed === false && stickyScrollDomNode.clientHeight === 0) {\n\t\t\t\tthis._focusedStickyElementIndex = -1;\n\t\t\t\tthis.focus();\n\n\t\t\t}\n\t\t\t// In all other casees, dispose the focus on the sticky scroll\n\t\t\telse {\n\t\t\t\tthis._disposeFocusStickyScrollStore();\n\t\t\t}\n\t\t}));\n\t\tthis._register(focusTracker.onDidFocus(_ => {\n\t\t\tthis.focus();\n\t\t}));\n\t\tthis._registerMouseListeners();\n\t\t// Suppose that mouse down on the sticky scroll, then do not focus on the sticky scroll because this will be followed by the revealing of a position\n\t\tthis._register(dom.addDisposableListener(stickyScrollDomNode, dom.EventType.MOUSE_DOWN, (e) => {\n\t\t\tthis._onMouseDown = true;\n\t\t}));\n\t\tthis._register(this._stickyScrollWidget.onDidChangeStickyScrollHeight((e) => {\n\t\t\tthis._onDidChangeStickyScrollHeight.fire(e);\n\t\t}));\n\t\tthis._onDidResize();\n\t\tthis._readConfiguration();\n\t}\n\n\tget stickyScrollWidgetHeight(): number {\n\t\treturn this._stickyScrollWidget.height;\n\t}\n\n\tpublic static get(editor: ICodeEditor): IStickyScrollController | null {\n\t\treturn editor.getContribution<StickyScrollController>(StickyScrollController.ID);\n\t}\n\n\tprivate _disposeFocusStickyScrollStore() {\n\t\tthis._stickyScrollFocusedContextKey.set(false);\n\t\tthis._focusDisposableStore?.dispose();\n\t\tthis._focused = false;\n\t\tthis._positionRevealed = false;\n\t\tthis._onMouseDown = false;\n\t}\n\n\tpublic isFocused(): boolean {\n\t\treturn this._focused;\n\t}\n\n\tpublic focus(): void {\n\t\t// If the mouse is down, do not focus on the sticky scroll\n\t\tif (this._onMouseDown) {\n\t\t\tthis._onMouseDown = false;\n\t\t\tthis._editor.focus();\n\t\t\treturn;\n\t\t}\n\t\tconst focusState = this._stickyScrollFocusedContextKey.get();\n\t\tif (focusState === true) {\n\t\t\treturn;\n\t\t}\n\t\tthis._focused = true;\n\t\tthis._focusDisposableStore = new DisposableStore();\n\t\tthis._stickyScrollFocusedContextKey.set(true);\n\t\tthis._focusedStickyElementIndex = this._stickyScrollWidget.lineNumbers.length - 1;\n\t\tthis._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);\n\t}\n\n\tpublic focusNext(): void {\n\t\tif (this._focusedStickyElementIndex < this._stickyScrollWidget.lineNumberCount - 1) {\n\t\t\tthis._focusNav(true);\n\t\t}\n\t}\n\n\tpublic focusPrevious(): void {\n\t\tif (this._focusedStickyElementIndex > 0) {\n\t\t\tthis._focusNav(false);\n\t\t}\n\t}\n\n\tpublic selectEditor(): void {\n\t\tthis._editor.focus();\n\t}\n\n\t// True is next, false is previous\n\tprivate _focusNav(direction: boolean): void {\n\t\tthis._focusedStickyElementIndex = direction ? this._focusedStickyElementIndex + 1 : this._focusedStickyElementIndex - 1;\n\t\tthis._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);\n\t}\n\n\tpublic goToFocused(): void {\n\t\tconst lineNumbers = this._stickyScrollWidget.lineNumbers;\n\t\tthis._disposeFocusStickyScrollStore();\n\t\tthis._revealPosition({ lineNumber: lineNumbers[this._focusedStickyElementIndex], column: 1 });\n\t}\n\n\tprivate _revealPosition(position: IPosition): void {\n\t\tthis._reveaInEditor(position, () => this._editor.revealPosition(position));\n\t}\n\n\tprivate _revealLineInCenterIfOutsideViewport(position: IPosition): void {\n\t\tthis._reveaInEditor(position, () => this._editor.revealLineInCenterIfOutsideViewport(position.lineNumber, ScrollType.Smooth));\n\t}\n\n\tprivate _reveaInEditor(position: IPosition, revealFunction: () => void): void {\n\t\tif (this._focused) {\n\t\t\tthis._disposeFocusStickyScrollStore();\n\t\t}\n\t\tthis._positionRevealed = true;\n\t\trevealFunction();\n\t\tthis._editor.setSelection(Range.fromPositions(position));\n\t\tthis._editor.focus();\n\t}\n\n\tprivate _registerMouseListeners(): void {\n\n\t\tconst sessionStore = this._register(new DisposableStore());\n\t\tconst gesture = this._register(new ClickLinkGesture(this._editor, {\n\t\t\textractLineNumberFromMouseEvent: (e) => {\n\t\t\t\tconst position = this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);\n\t\t\t\treturn position ? position.lineNumber : 0;\n\t\t\t}\n\t\t}));\n\n\t\tconst getMouseEventTarget = (mouseEvent: ClickLinkMouseEvent): { range: Range; textElement: HTMLElement } | null => {\n\t\t\tif (!this._editor.hasModel()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tif (mouseEvent.target.type !== MouseTargetType.OVERLAY_WIDGET || mouseEvent.target.detail !== this._stickyScrollWidget.getId()) {\n\t\t\t\t// not hovering over our widget\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tconst mouseTargetElement = mouseEvent.target.element;\n\t\t\tif (!mouseTargetElement || mouseTargetElement.innerText !== mouseTargetElement.innerHTML) {\n\t\t\t\t// not on a span element rendering text\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tconst position = this._stickyScrollWidget.getEditorPositionFromNode(mouseTargetElement);\n\t\t\tif (!position) {\n\t\t\t\t// not hovering a sticky scroll line\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\trange: new Range(position.lineNumber, position.column, position.lineNumber, position.column + mouseTargetElement.innerText.length),\n\t\t\t\ttextElement: mouseTargetElement\n\t\t\t};\n\t\t};\n\n\t\tconst stickyScrollWidgetDomNode = this._stickyScrollWidget.getDomNode();\n\t\tthis._register(dom.addStandardDisposableListener(stickyScrollWidgetDomNode, dom.EventType.CLICK, (mouseEvent: IMouseEvent) => {\n\t\t\tif (mouseEvent.ctrlKey || mouseEvent.altKey || mouseEvent.metaKey) {\n\t\t\t\t// modifier pressed\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!mouseEvent.leftButton) {\n\t\t\t\t// not left click\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (mouseEvent.shiftKey) {\n\t\t\t\t// shift click\n\t\t\t\tconst lineIndex = this._stickyScrollWidget.getLineIndexFromChildDomNode(mouseEvent.target);\n\t\t\t\tif (lineIndex === null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst position = new Position(this._endLineNumbers[lineIndex], 1);\n\t\t\t\tthis._revealLineInCenterIfOutsideViewport(position);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst isInFoldingIconDomNode = this._stickyScrollWidget.isInFoldingIconDomNode(mouseEvent.target);\n\t\t\tif (isInFoldingIconDomNode) {\n\t\t\t\t// clicked on folding icon\n\t\t\t\tconst lineNumber = this._stickyScrollWidget.getLineNumberFromChildDomNode(mouseEvent.target);\n\t\t\t\tthis._toggleFoldingRegionForLine(lineNumber);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst isInStickyLine = this._stickyScrollWidget.isInStickyLine(mouseEvent.target);\n\t\t\tif (!isInStickyLine) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// normal click\n\t\t\tlet position = this._stickyScrollWidget.getEditorPositionFromNode(mouseEvent.target);\n\t\t\tif (!position) {\n\t\t\t\tconst lineNumber = this._stickyScrollWidget.getLineNumberFromChildDomNode(mouseEvent.target);\n\t\t\t\tif (lineNumber === null) {\n\t\t\t\t\t// not hovering a sticky scroll line\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tposition = new Position(lineNumber, 1);\n\t\t\t}\n\t\t\tthis._revealPosition(position);\n\t\t}));\n\t\tthis._register(dom.addDisposableListener(mainWindow, dom.EventType.MOUSE_MOVE, mouseEvent => {\n\t\t\t// Only remember targets inside the widget to not retain arbitrary, later detached, DOM (#146841)\n\t\t\tconst target = mouseEvent.target;\n\t\t\tthis._mouseTarget = dom.isHTMLElement(target) && this._stickyScrollWidget.getDomNode().contains(target) ? target : null;\n\t\t\tthis._onMouseMoveOrKeyDown(mouseEvent);\n\t\t}));\n\t\tthis._register(dom.addDisposableListener(mainWindow, dom.EventType.KEY_DOWN, mouseEvent => {\n\t\t\tthis._onMouseMoveOrKeyDown(mouseEvent);\n\t\t}));\n\t\tthis._register(dom.addDisposableListener(mainWindow, dom.EventType.KEY_UP, () => {\n\t\t\tif (this._showEndForLine !== undefined) {\n\t\t\t\tthis._showEndForLine = undefined;\n\t\t\t\tthis._renderStickyScroll();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(gesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, _keyboardEvent]) => {\n\t\t\tconst mouseTarget = getMouseEventTarget(mouseEvent);\n\t\t\tif (!mouseTarget || !mouseEvent.hasTriggerModifier || !this._editor.hasModel()) {\n\t\t\t\tsessionStore.clear();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { range, textElement } = mouseTarget;\n\n\t\t\tif (!range.equalsRange(this._stickyRangeProjectedOnEditor)) {\n\t\t\t\tthis._stickyRangeProjectedOnEditor = range;\n\t\t\t\tsessionStore.clear();\n\t\t\t} else if (textElement.style.textDecoration === 'underline') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst cancellationToken = new CancellationTokenSource();\n\t\t\tsessionStore.add(toDisposable(() => cancellationToken.dispose(true)));\n\n\t\t\tlet currentHTMLChild: HTMLElement;\n\n\t\t\tgetDefinitionsAtPosition(this._languageFeaturesService.definitionProvider, this._editor.getModel(), new Position(range.startLineNumber, range.startColumn + 1), false, cancellationToken.token).then((candidateDefinitions => {\n\t\t\t\tif (cancellationToken.token.isCancellationRequested) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (candidateDefinitions.length !== 0) {\n\t\t\t\t\tthis._candidateDefinitionsLength = candidateDefinitions.length;\n\t\t\t\t\tconst childHTML: HTMLElement = textElement;\n\t\t\t\t\tif (currentHTMLChild !== childHTML) {\n\t\t\t\t\t\tsessionStore.clear();\n\t\t\t\t\t\tcurrentHTMLChild = childHTML;\n\t\t\t\t\t\tcurrentHTMLChild.style.textDecoration = 'underline';\n\t\t\t\t\t\tsessionStore.add(toDisposable(() => {\n\t\t\t\t\t\t\tcurrentHTMLChild.style.textDecoration = 'none';\n\t\t\t\t\t\t}));\n\t\t\t\t\t} else if (!currentHTMLChild) {\n\t\t\t\t\t\tcurrentHTMLChild = childHTML;\n\t\t\t\t\t\tcurrentHTMLChild.style.textDecoration = 'underline';\n\t\t\t\t\t\tsessionStore.add(toDisposable(() => {\n\t\t\t\t\t\t\tcurrentHTMLChild.style.textDecoration = 'none';\n\t\t\t\t\t\t}));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tsessionStore.clear();\n\t\t\t\t}\n\t\t\t}));\n\t\t}));\n\t\tthis._register(gesture.onCancel(() => {\n\t\t\tsessionStore.clear();\n\t\t}));\n\t\tthis._register(gesture.onExecute(async e => {\n\t\t\tif (e.target.type !== MouseTargetType.OVERLAY_WIDGET || e.target.detail !== this._stickyScrollWidget.getId()) {\n\t\t\t\t// not hovering over our widget\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst position = this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);\n\t\t\tif (!position) {\n\t\t\t\t// not hovering a sticky scroll line\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!this._editor.hasModel() || !this._stickyRangeProjectedOnEditor) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this._candidateDefinitionsLength > 1) {\n\t\t\t\tif (this._focused) {\n\t\t\t\t\tthis._disposeFocusStickyScrollStore();\n\t\t\t\t}\n\t\t\t\tthis._revealPosition({ lineNumber: position.lineNumber, column: 1 });\n\t\t\t}\n\t\t\tthis._instaService.invokeFunction(goToDefinitionWithLocation, e, this._editor, { uri: this._editor.getModel().uri, range: this._stickyRangeProjectedOnEditor });\n\t\t}));\n\t}\n\n\tprivate _onContextMenu(targetWindow: Window, e: MouseEvent) {\n\t\tconst event = new StandardMouseEvent(targetWindow, e);\n\n\t\tthis._contextMenuService.showContextMenu({\n\t\t\tmenuId: MenuId.StickyScrollContext,\n\t\t\tgetAnchor: () => event,\n\t\t\tmenuActionOptions: { renderShortTitle: true },\n\t\t});\n\t}\n\n\tprivate _onMouseMoveOrKeyDown(mouseEvent: KeyboardEvent | MouseEvent): void {\n\t\tif (!mouseEvent.shiftKey) {\n\t\t\treturn;\n\t\t}\n\t\tif (!this._mouseTarget || !dom.isHTMLElement(this._mouseTarget)) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentEndForLineIndex = this._stickyScrollWidget.getLineIndexFromChildDomNode(this._mouseTarget);\n\t\tif (currentEndForLineIndex === null || this._showEndForLine === currentEndForLineIndex) {\n\t\t\treturn;\n\t\t}\n\t\tthis._showEndForLine = currentEndForLineIndex;\n\t\tthis._renderStickyScroll();\n\t}\n\n\tprivate _toggleFoldingRegionForLine(line: number | null) {\n\t\tif (!this._foldingModel || line === null) {\n\t\t\treturn;\n\t\t}\n\t\tconst stickyLine = this._stickyScrollWidget.getRenderedStickyLine(line);\n\t\tconst foldingIcon = stickyLine?.foldingIcon;\n\t\tif (!foldingIcon) {\n\t\t\treturn;\n\t\t}\n\t\ttoggleCollapseState(this._foldingModel, 1, [line]);\n\t\tfoldingIcon.isCollapsed = !foldingIcon.isCollapsed;\n\t\tconst scrollTop = (foldingIcon.isCollapsed ?\n\t\t\tthis._editor.getTopForLineNumber(foldingIcon.foldingEndLine)\n\t\t\t: this._editor.getTopForLineNumber(foldingIcon.foldingStartLine))\n\t\t\t- this._editor.getOption(EditorOption.lineHeight) * stickyLine.index + 1;\n\t\tthis._editor.setScrollTop(scrollTop);\n\t\tthis._renderStickyScroll(line);\n\t}\n\n\tprivate _readConfiguration() {\n\t\tconst options = this._editor.getOption(EditorOption.stickyScroll);\n\t\tif (options.enabled === false) {\n\t\t\tthis._editor.removeOverlayWidget(this._stickyScrollWidget);\n\t\t\tthis._resetState();\n\t\t\tthis._sessionStore.clear();\n\t\t\tthis._enabled = false;\n\t\t\treturn;\n\t\t} else if (options.enabled && !this._enabled) {\n\t\t\t// When sticky scroll was just enabled, add the listeners on the sticky scroll\n\t\t\tthis._editor.addOverlayWidget(this._stickyScrollWidget);\n\t\t\tthis._sessionStore.add(this._editor.onDidScrollChange((e) => {\n\t\t\t\tif (e.scrollTopChanged) {\n\t\t\t\t\tthis._showEndForLine = undefined;\n\t\t\t\t\tthis._renderStickyScroll();\n\t\t\t\t}\n\t\t\t}));\n\t\t\tthis._sessionStore.add(this._editor.onDidLayoutChange(() => this._onDidResize()));\n\t\t\tthis._sessionStore.add(this._editor.onDidChangeModelTokens((e) => this._onTokensChange(e)));\n\t\t\tthis._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(() => {\n\t\t\t\tthis._showEndForLine = undefined;\n\t\t\t\tthis._renderStickyScroll();\n\t\t\t}));\n\t\t\tthis._enabled = true;\n\t\t}\n\n\t\tconst lineNumberOption = this._editor.getOption(EditorOption.lineNumbers);\n\t\tif (lineNumberOption.renderType === RenderLineNumbersType.Relative) {\n\t\t\tif (!this._cursorPositionListener) {\n\t\t\t\tthis._cursorPositionListener = this._editor.onDidChangeCursorPosition((e) => {\n\t\t\t\t\tif (this._positionLineNumber === e.position.lineNumber) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis._positionLineNumber = e.position.lineNumber;\n\t\t\t\t\tthis._showEndForLine = undefined;\n\t\t\t\t\tthis._renderStickyScroll(0);\n\t\t\t\t});\n\t\t\t\tthis._sessionStore.add(this._cursorPositionListener);\n\t\t\t}\n\t\t} else if (this._cursorPositionListener) {\n\t\t\tthis._sessionStore.delete(this._cursorPositionListener);\n\t\t\tthis._cursorPositionListener.dispose();\n\t\t\tthis._cursorPositionListener = undefined;\n\t\t}\n\t}\n\n\tprivate _readConfigurationChange(event: ConfigurationChangedEvent) {\n\t\tif (\n\t\t\tevent.hasChanged(EditorOption.stickyScroll)\n\t\t\t|| event.hasChanged(EditorOption.minimap)\n\t\t\t|| event.hasChanged(EditorOption.lineHeight)\n\t\t\t|| event.hasChanged(EditorOption.showFoldingControls)\n\t\t\t|| event.hasChanged(EditorOption.lineNumbers)\n\t\t) {\n\t\t\tthis._readConfiguration();\n\t\t}\n\n\t\tif (\n\t\t\tevent.hasChanged(EditorOption.lineNumbers)\n\t\t\t|| event.hasChanged(EditorOption.folding)\n\t\t\t|| event.hasChanged(EditorOption.showFoldingControls)\n\t\t\t|| event.hasChanged(EditorOption.fontInfo)\n\t\t\t|| event.hasChanged(EditorOption.effectiveFullwidthCharacterWidth)\n\t\t) {\n\t\t\tthis._renderStickyScroll(0);\n\t\t}\n\t}\n\n\tprivate _needsUpdate(event: IModelTokensChangedEvent) {\n\t\tconst stickyLineNumbers = this._stickyScrollWidget.getCurrentLines();\n\t\tfor (const stickyLineNumber of stickyLineNumbers) {\n\t\t\tfor (const range of event.ranges) {\n\t\t\t\tif (stickyLineNumber >= range.fromLineNumber && stickyLineNumber <= range.toLineNumber) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate _onTokensChange(event: IModelTokensChangedEvent) {\n\t\tif (this._needsUpdate(event)) {\n\t\t\t// Rebuilding the whole widget from line 0\n\t\t\tthis._renderStickyScroll(0);\n\t\t}\n\t}\n\n\tprivate _onDidResize() {\n\t\tconst layoutInfo = this._editor.getLayoutInfo();\n\t\t// Make sure sticky scroll doesn't take up more than 25% of the editor\n\t\tconst theoreticalLines = layoutInfo.height / this._editor.getOption(EditorOption.lineHeight);\n\t\tthis._maxStickyLines = Math.round(theoreticalLines * .25);\n\t\tthis._renderStickyScroll(0);\n\t}\n\n\tprivate async _renderStickyScroll(rebuildFromLine?: number): Promise<void> {\n\t\tconst model = this._editor.getModel();\n\t\tif (!model || model.isTooLargeForTokenization()) {\n\t\t\tthis._resetState();\n\t\t\treturn;\n\t\t}\n\t\tconst nextRebuildFromLine = this._updateAndGetMinRebuildFromLine(rebuildFromLine);\n\t\tconst stickyWidgetVersion = this._stickyLineCandidateProvider.getVersionId();\n\t\tconst shouldUpdateState = stickyWidgetVersion === undefined || stickyWidgetVersion === model.getVersionId();\n\t\tif (shouldUpdateState) {\n\t\t\tif (!this._focused) {\n\t\t\t\tawait this._updateState(nextRebuildFromLine);\n\t\t\t} else {\n\t\t\t\t// Suppose that previously the sticky scroll widget had height 0, then if there are visible lines, set the last line as focused\n\t\t\t\tif (this._focusedStickyElementIndex === -1) {\n\t\t\t\t\tawait this._updateState(nextRebuildFromLine);\n\t\t\t\t\tthis._focusedStickyElementIndex = this._stickyScrollWidget.lineNumberCount - 1;\n\t\t\t\t\tif (this._focusedStickyElementIndex !== -1) {\n\t\t\t\t\t\tthis._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tconst focusedStickyElementLineNumber = this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];\n\t\t\t\t\tawait this._updateState(nextRebuildFromLine);\n\t\t\t\t\t// Suppose that after setting the state, there are no sticky lines, set the focused index to -1\n\t\t\t\t\tif (this._stickyScrollWidget.lineNumberCount === 0) {\n\t\t\t\t\t\tthis._focusedStickyElementIndex = -1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst previousFocusedLineNumberExists = this._stickyScrollWidget.lineNumbers.includes(focusedStickyElementLineNumber);\n\n\t\t\t\t\t\t// If the line number is still there, do not change anything\n\t\t\t\t\t\t// If the line number is not there, set the new focused line to be the last line\n\t\t\t\t\t\tif (!previousFocusedLineNumberExists) {\n\t\t\t\t\t\t\tthis._focusedStickyElementIndex = this._stickyScrollWidget.lineNumberCount - 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _updateAndGetMinRebuildFromLine(rebuildFromLine: number | undefined): number | undefined {\n\t\tif (rebuildFromLine !== undefined) {\n\t\t\tconst minRebuildFromLineOrInfinity = this._minRebuildFromLine !== undefined ? this._minRebuildFromLine : Infinity;\n\t\t\tthis._minRebuildFromLine = Math.min(rebuildFromLine, minRebuildFromLineOrInfinity);\n\t\t}\n\t\treturn this._minRebuildFromLine;\n\t}\n\n\tprivate async _updateState(rebuildFromLine?: number): Promise<void> {\n\t\tthis._minRebuildFromLine = undefined;\n\t\tthis._foldingModel = await FoldingController.get(this._editor)?.getFoldingModel() ?? undefined;\n\t\tthis._widgetState = this.findScrollWidgetState();\n\t\tconst stickyWidgetHasLines = this._widgetState.startLineNumbers.length > 0;\n\t\tthis._stickyScrollVisibleContextKey.set(stickyWidgetHasLines);\n\t\tthis._stickyScrollWidget.setState(this._widgetState, this._foldingModel, rebuildFromLine);\n\t}\n\n\tprivate async _resetState(): Promise<void> {\n\t\tthis._minRebuildFromLine = undefined;\n\t\tthis._foldingModel = undefined;\n\t\tthis._widgetState = StickyScrollWidgetState.Empty;\n\t\tthis._stickyScrollVisibleContextKey.set(false);\n\t\tthis._stickyScrollWidget.setState(undefined, undefined);\n\t}\n\n\tfindScrollWidgetState(): StickyScrollWidgetState {\n\t\tconst maxNumberStickyLines = Math.min(this._maxStickyLines, this._editor.getOption(EditorOption.stickyScroll).maxLineCount);\n\t\tconst scrollTop: number = this._editor.getScrollTop();\n\t\tlet lastLineRelativePosition: number = 0;\n\t\tconst startLineNumbers: number[] = [];\n\t\tconst endLineNumbers: number[] = [];\n\t\tconst arrayVisibleRanges = this._editor.getVisibleRanges();\n\t\tif (arrayVisibleRanges.length !== 0) {\n\t\t\tconst fullVisibleRange = new StickyRange(arrayVisibleRanges[0].startLineNumber, arrayVisibleRanges[arrayVisibleRanges.length - 1].endLineNumber);\n\t\t\tconst candidateRanges = this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(fullVisibleRange);\n\t\t\tfor (const range of candidateRanges) {\n\t\t\t\tconst start = range.startLineNumber;\n\t\t\t\tconst end = range.endLineNumber;\n\t\t\t\tconst topOfElement = range.top;\n\t\t\t\tconst bottomOfElement = topOfElement + range.height;\n\t\t\t\tconst topOfBeginningLine = this._editor.getTopForLineNumber(start) - scrollTop;\n\t\t\t\tconst bottomOfEndLine = this._editor.getBottomForLineNumber(end) - scrollTop;\n\t\t\t\tif (topOfElement > topOfBeginningLine && topOfElement <= bottomOfEndLine) {\n\t\t\t\t\tstartLineNumbers.push(start);\n\t\t\t\t\tendLineNumbers.push(end + 1);\n\t\t\t\t\tif (bottomOfElement > bottomOfEndLine) {\n\t\t\t\t\t\tlastLineRelativePosition = bottomOfEndLine - bottomOfElement;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (startLineNumbers.length === maxNumberStickyLines) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis._endLineNumbers = endLineNumbers;\n\t\treturn new StickyScrollWidgetState(startLineNumbers, endLineNumbers, lastLineRelativePosition, this._showEndForLine);\n\t}\n\n\toverride dispose(): void {\n\t\tsuper.dispose();\n\t\tthis._sessionStore.dispose();\n\t}\n}\n"]}
|
|
@@ -43,7 +43,7 @@ let StickyModelProvider = class StickyModelProvider extends Disposable {
|
|
|
43
43
|
this._modelPromise = null;
|
|
44
44
|
this._updateScheduler = this._register(new Delayer(300));
|
|
45
45
|
this._updateOperation = this._register(new DisposableStore());
|
|
46
|
-
switch (this._editor.getOption(
|
|
46
|
+
switch (this._editor.getOption(134 /* EditorOption.stickyScroll */).defaultModel) {
|
|
47
47
|
case ModelProvider.OUTLINE_MODEL:
|
|
48
48
|
this._modelProviders.push(new StickyModelFromCandidateOutlineProvider(this._editor, _languageFeaturesService));
|
|
49
49
|
// fall through
|
|
@@ -43,7 +43,7 @@ let StickyLineCandidateProvider = class StickyLineCandidateProvider extends Disp
|
|
|
43
43
|
this._sessionStore = this._register(new DisposableStore());
|
|
44
44
|
this._updateSoon = this._register(new RunOnceScheduler(() => this.update(), 50));
|
|
45
45
|
this._register(this._editor.onDidChangeConfiguration(e => {
|
|
46
|
-
if (e.hasChanged(
|
|
46
|
+
if (e.hasChanged(134 /* EditorOption.stickyScroll */)) {
|
|
47
47
|
this.readConfiguration();
|
|
48
48
|
}
|
|
49
49
|
}));
|
|
@@ -54,7 +54,7 @@ let StickyLineCandidateProvider = class StickyLineCandidateProvider extends Disp
|
|
|
54
54
|
*/
|
|
55
55
|
readConfiguration() {
|
|
56
56
|
this._sessionStore.clear();
|
|
57
|
-
const options = this._editor.getOption(
|
|
57
|
+
const options = this._editor.getOption(134 /* EditorOption.stickyScroll */);
|
|
58
58
|
if (!options.enabled) {
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
@@ -69,10 +69,10 @@ export class StickyScrollWidget extends Disposable {
|
|
|
69
69
|
this._rootDomNode.appendChild(this._linesDomNodeScrollable);
|
|
70
70
|
this._setHeight(0);
|
|
71
71
|
const updateScrollLeftPosition = () => {
|
|
72
|
-
this._linesDomNode.style.left = this._editor.getOption(
|
|
72
|
+
this._linesDomNode.style.left = this._editor.getOption(134 /* EditorOption.stickyScroll */).scrollWithEditor ? `-${this._editor.getScrollLeft()}px` : '0px';
|
|
73
73
|
};
|
|
74
74
|
this._register(this._editor.onDidChangeConfiguration((e) => {
|
|
75
|
-
if (e.hasChanged(
|
|
75
|
+
if (e.hasChanged(134 /* EditorOption.stickyScroll */)) {
|
|
76
76
|
updateScrollLeftPosition();
|
|
77
77
|
}
|
|
78
78
|
}));
|
|
@@ -242,7 +242,7 @@ export class StickyScrollWidget extends Disposable {
|
|
|
242
242
|
}
|
|
243
243
|
_setFoldingHoverListeners() {
|
|
244
244
|
this._foldingIconStore.clear();
|
|
245
|
-
const showFoldingControls = this._editor.getOption(
|
|
245
|
+
const showFoldingControls = this._editor.getOption(129 /* EditorOption.showFoldingControls */);
|
|
246
246
|
if (showFoldingControls !== 'mouseover') {
|
|
247
247
|
return;
|
|
248
248
|
}
|
|
@@ -372,7 +372,7 @@ class RenderedStickyLine {
|
|
|
372
372
|
const viewLineNumber = viewModel.coordinatesConverter.convertModelPositionToViewPosition(new Position(lineNumber, 1)).lineNumber;
|
|
373
373
|
const lineRenderingData = viewModel.getViewLineRenderingData(viewLineNumber);
|
|
374
374
|
const lineNumberOption = editor.getOption(76 /* EditorOption.lineNumbers */);
|
|
375
|
-
const verticalScrollbarSize = editor.getOption(
|
|
375
|
+
const verticalScrollbarSize = editor.getOption(119 /* EditorOption.scrollbar */).verticalScrollbarSize;
|
|
376
376
|
let actualInlineDecorations;
|
|
377
377
|
try {
|
|
378
378
|
actualInlineDecorations = LineDecoration.filter(lineRenderingData.inlineDecorations, viewLineNumber, lineRenderingData.minColumn, lineRenderingData.maxColumn);
|
|
@@ -383,7 +383,7 @@ class RenderedStickyLine {
|
|
|
383
383
|
const lineHeight = editor.getLineHeightForPosition(new Position(lineNumber, 1));
|
|
384
384
|
const textDirection = viewModel.getTextDirection(lineNumber);
|
|
385
385
|
const fontInfo = editor.getOption(59 /* EditorOption.fontInfo */);
|
|
386
|
-
const renderLineInput = new RenderLineInput(true, true, lineRenderingData.content, lineRenderingData.continuesWithWrappedLine, lineRenderingData.isBasicASCII, lineRenderingData.containsRTL, 0, lineRenderingData.tokens, actualInlineDecorations, lineRenderingData.tabSize, lineRenderingData.startVisibleColumn, fontInfo.spaceWidth, 1, 1, 500, 'none', true, true, null, textDirection, verticalScrollbarSize, false, editor.getOption(
|
|
386
|
+
const renderLineInput = new RenderLineInput(true, true, lineRenderingData.content, lineRenderingData.continuesWithWrappedLine, lineRenderingData.isBasicASCII, lineRenderingData.containsRTL, 0, lineRenderingData.tokens, actualInlineDecorations, lineRenderingData.tabSize, lineRenderingData.startVisibleColumn, fontInfo.spaceWidth, 1, 1, 500, 'none', true, true, null, textDirection, verticalScrollbarSize, false, editor.getOption(179 /* EditorOption.effectiveFullwidthCharacterWidth */) === 'twoCells');
|
|
387
387
|
const sb = new StringBuilder(2000);
|
|
388
388
|
const renderOutput = renderViewLine(renderLineInput, sb);
|
|
389
389
|
this.characterMapping = renderOutput.characterMapping;
|
|
@@ -439,7 +439,7 @@ class RenderedStickyLine {
|
|
|
439
439
|
this.height = lineHeight;
|
|
440
440
|
}
|
|
441
441
|
_renderFoldingIconForLine(editor, foldingModel, line, lineHeight, isOnGlyphMargin) {
|
|
442
|
-
const showFoldingControls = editor.getOption(
|
|
442
|
+
const showFoldingControls = editor.getOption(129 /* EditorOption.showFoldingControls */);
|
|
443
443
|
if (!foldingModel || showFoldingControls === 'never') {
|
|
444
444
|
return;
|
|
445
445
|
}
|
|
@@ -21,15 +21,15 @@ import { ILanguageFeaturesService } from '../../../common/services/languageFeatu
|
|
|
21
21
|
import { historyNavigationVisible } from '../../../../platform/history/browser/contextScopedHistoryWidget.js';
|
|
22
22
|
export const Context = {
|
|
23
23
|
Visible: historyNavigationVisible,
|
|
24
|
-
HasFocusedSuggestion: new RawContextKey('suggestWidgetHasFocusedSuggestion', false, localize(
|
|
25
|
-
DetailsVisible: new RawContextKey('suggestWidgetDetailsVisible', false, localize(
|
|
26
|
-
DetailsFocused: new RawContextKey('suggestWidgetDetailsFocused', false, localize(
|
|
27
|
-
MultipleSuggestions: new RawContextKey('suggestWidgetMultipleSuggestions', false, localize(
|
|
28
|
-
MakesTextEdit: new RawContextKey('suggestionMakesTextEdit', true, localize(
|
|
29
|
-
AcceptSuggestionsOnEnter: new RawContextKey('acceptSuggestionOnEnter', true, localize(
|
|
30
|
-
HasInsertAndReplaceRange: new RawContextKey('suggestionHasInsertAndReplaceRange', false, localize(
|
|
31
|
-
InsertMode: new RawContextKey('suggestionInsertMode', undefined, { type: 'string', description: localize(
|
|
32
|
-
CanResolve: new RawContextKey('suggestionCanResolve', false, localize(
|
|
24
|
+
HasFocusedSuggestion: new RawContextKey('suggestWidgetHasFocusedSuggestion', false, localize(1532, "Whether any suggestion is focused")),
|
|
25
|
+
DetailsVisible: new RawContextKey('suggestWidgetDetailsVisible', false, localize(1533, "Whether suggestion details are visible")),
|
|
26
|
+
DetailsFocused: new RawContextKey('suggestWidgetDetailsFocused', false, localize(1534, "Whether the details pane of the suggest widget has focus")),
|
|
27
|
+
MultipleSuggestions: new RawContextKey('suggestWidgetMultipleSuggestions', false, localize(1535, "Whether there are multiple suggestions to pick from")),
|
|
28
|
+
MakesTextEdit: new RawContextKey('suggestionMakesTextEdit', true, localize(1536, "Whether inserting the current suggestion yields in a change or has everything already been typed")),
|
|
29
|
+
AcceptSuggestionsOnEnter: new RawContextKey('acceptSuggestionOnEnter', true, localize(1537, "Whether suggestions are inserted when pressing Enter")),
|
|
30
|
+
HasInsertAndReplaceRange: new RawContextKey('suggestionHasInsertAndReplaceRange', false, localize(1538, "Whether the current suggestion has insert and replace behaviour")),
|
|
31
|
+
InsertMode: new RawContextKey('suggestionInsertMode', undefined, { type: 'string', description: localize(1539, "Whether the default behaviour is to insert or replace") }),
|
|
32
|
+
CanResolve: new RawContextKey('suggestionCanResolve', false, localize(1540, "Whether the current suggestion supports to resolve further details")),
|
|
33
33
|
};
|
|
34
34
|
export const suggestWidgetStatusbarMenu = new MenuId('suggestWidgetStatusBar');
|
|
35
35
|
export class CompletionItem {
|