monaco-editor-core 0.56.0-dev-20251125 → 0.56.0-dev-20251217
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +30 -4
- package/esm/vs/base/browser/dom.js +1 -4
- package/esm/vs/base/browser/dom.js.map +1 -1
- package/esm/vs/base/browser/markdownRenderer.js +25 -11
- package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
- package/esm/vs/base/browser/ui/button/button.js +15 -8
- package/esm/vs/base/browser/ui/button/button.js.map +1 -1
- package/esm/vs/base/browser/ui/codicons/codicon/codicon-modifiers.css +3 -8
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/browser/ui/list/list.css +1 -0
- package/esm/vs/base/browser/ui/toolbar/toolbar.js +3 -0
- package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
- package/esm/vs/base/common/codiconsLibrary.js +11 -2
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/base/common/defaultAccount.js +6 -0
- package/esm/vs/base/common/defaultAccount.js.map +1 -0
- package/esm/vs/base/common/equals.js +73 -24
- package/esm/vs/base/common/equals.js.map +1 -1
- package/esm/vs/base/common/event.js +14 -4
- package/esm/vs/base/common/event.js.map +1 -1
- package/esm/vs/base/common/iterator.js.map +1 -1
- package/esm/vs/base/common/keybindings.js +0 -8
- package/esm/vs/base/common/keybindings.js.map +1 -1
- package/esm/vs/base/common/lifecycle.js +2 -2
- package/esm/vs/base/common/lifecycle.js.map +1 -1
- package/esm/vs/base/common/marshallingIds.js.map +1 -1
- package/esm/vs/base/common/observableInternal/index.js +1 -1
- package/esm/vs/base/common/observableInternal/index.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js +1 -1
- package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
- package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js +16 -0
- package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
- package/esm/vs/base/common/observableInternal/utils/utils.js +11 -0
- package/esm/vs/base/common/observableInternal/utils/utils.js.map +1 -1
- package/esm/vs/base/common/product.js.map +1 -1
- package/esm/vs/base/common/strings.js +3 -1
- package/esm/vs/base/common/strings.js.map +1 -1
- package/esm/vs/editor/browser/controller/dragScrolling.js +2 -1
- package/esm/vs/editor/browser/controller/dragScrolling.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js +73 -2
- package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +7 -51
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/screenReaderUtils.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +7 -20
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js +14 -44
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry.js +19 -0
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry.js.map +1 -0
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.js +14 -1
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseHandler.js +5 -2
- package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
- package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
- package/esm/vs/editor/browser/observableCodeEditor.js +32 -15
- package/esm/vs/editor/browser/observableCodeEditor.js.map +1 -1
- package/esm/vs/editor/browser/view.js +11 -2
- package/esm/vs/editor/browser/view.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +5 -2
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +10 -0
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/style.css +48 -0
- package/esm/vs/editor/common/config/fontInfo.js +1 -1
- package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
- package/esm/vs/editor/common/core/edits/edit.js +19 -0
- package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
- package/esm/vs/editor/common/core/edits/stringEdit.js +13 -0
- package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
- package/esm/vs/editor/common/core/edits/textEdit.js +0 -3
- package/esm/vs/editor/common/core/edits/textEdit.js.map +1 -1
- package/esm/vs/editor/common/core/text/positionToOffsetImpl.js +24 -10
- package/esm/vs/editor/common/core/text/positionToOffsetImpl.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorMoveCommands.js +4 -4
- package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorWordOperations.js +6 -3
- package/esm/vs/editor/common/cursor/cursorWordOperations.js.map +1 -1
- package/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js +2 -2
- package/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js.map +1 -1
- package/esm/vs/editor/common/languages/nullTokenize.js +1 -1
- package/esm/vs/editor/common/languages/nullTokenize.js.map +1 -1
- package/esm/vs/editor/common/languages/supports/tokenization.js +3 -0
- package/esm/vs/editor/common/languages/supports/tokenization.js.map +1 -1
- package/esm/vs/editor/common/languages.js +2 -1
- package/esm/vs/editor/common/languages.js.map +1 -1
- package/esm/vs/editor/common/model/decorationProvider.js +21 -1
- package/esm/vs/editor/common/model/decorationProvider.js.map +1 -1
- package/esm/vs/editor/common/model/textModel.js +49 -30
- package/esm/vs/editor/common/model/textModel.js.map +1 -1
- package/esm/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js +6 -3
- package/esm/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js.map +1 -1
- package/esm/vs/editor/common/model/tokens/annotations.js +177 -0
- package/esm/vs/editor/common/model/tokens/annotations.js.map +1 -0
- package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js +131 -0
- package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js.map +1 -0
- package/esm/vs/editor/common/model/tokens/tokenizationTextModelPart.js +9 -0
- package/esm/vs/editor/common/model/tokens/tokenizationTextModelPart.js.map +1 -1
- package/esm/vs/editor/common/model/tokens/tokenizerSyntaxTokenBackend.js +9 -0
- package/esm/vs/editor/common/model/tokens/tokenizerSyntaxTokenBackend.js.map +1 -1
- package/esm/vs/editor/common/textModelEditSource.js +2 -0
- package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
- package/esm/vs/editor/common/textModelEvents.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/lineDecorations.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +1 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +54 -36
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js.map +1 -1
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +14 -1
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js.map +1 -1
- package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +1 -1
- package/esm/vs/editor/contrib/hover/browser/hover.css +1 -1
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +1 -1
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
- package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +1 -0
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commandIds.js +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commandIds.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +33 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +13 -12
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +7 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js +2 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/InlineSuggestAlternativeAction.js +8 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/InlineSuggestAlternativeAction.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/editKind.js +198 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/editKind.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionIsVisible.js +40 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionIsVisible.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +128 -70
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +59 -11
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +152 -95
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js +113 -54
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +317 -75
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/telemetry.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/utils.js +20 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/utils.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +59 -42
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +29 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +78 -46
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js +9 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +11 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +81 -41
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js +48 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +18 -15
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js +3 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js +6 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js +4 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +4 -3
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js +8 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js +9 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +203 -41
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.js +189 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js +85 -102
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js +75 -32
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistnaceWidgetPlacement.js +121 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistnaceWidgetPlacement.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js +2 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +22 -20
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js +15 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.css +39 -6
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js +10 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js.map +1 -1
- 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/linesOperations/browser/linesOperations.js.map +1 -1
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
- package/esm/vs/editor/contrib/links/browser/links.js +10 -10
- package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
- 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/quickAccess/browser/gotoLineQuickAccess.js +11 -11
- package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
- package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
- package/esm/vs/editor/contrib/rename/browser/rename.js +19 -15
- package/esm/vs/editor/contrib/rename/browser/rename.js.map +1 -1
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
- package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js +3 -2
- package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js.map +1 -1
- package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetParser.js +33 -0
- package/esm/vs/editor/contrib/snippet/browser/snippetParser.js.map +1 -1
- 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 +12 -4
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js.map +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +1 -0
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +9 -8
- package/esm/vs/editor/contrib/suggest/browser/suggest.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +39 -28
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +1 -0
- package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +22 -18
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +28 -6
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/wordContextKey.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 +24 -24
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
- package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +19 -2
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js.map +1 -1
- package/esm/vs/editor/editor.api.d.ts +34 -3
- package/esm/vs/editor/standalone/browser/standaloneLanguages.js +2 -2
- package/esm/vs/editor/standalone/browser/standaloneLanguages.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneServices.js +11 -1
- package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
- package/esm/vs/editor/standalone/common/monarch/monarchLexer.js +1 -1
- package/esm/vs/editor/standalone/common/monarch/monarchLexer.js.map +1 -1
- package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
- package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
- package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
- package/esm/vs/platform/actionWidget/browser/actionWidget.css +11 -8
- package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
- package/esm/vs/platform/actions/browser/toolbar.js +2 -2
- package/esm/vs/platform/actions/common/actions.js +11 -5
- package/esm/vs/platform/actions/common/actions.js.map +1 -1
- package/esm/vs/platform/actions/common/menuService.js +2 -2
- package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
- package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
- package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
- package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
- package/esm/vs/platform/contextkey/common/scanner.js +5 -5
- package/esm/vs/platform/{product/common/productService.js → defaultAccount/common/defaultAccount.js} +2 -2
- package/esm/vs/platform/defaultAccount/common/defaultAccount.js.map +1 -0
- package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
- package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
- package/esm/vs/platform/instantiation/common/instantiation.js.map +1 -1
- package/esm/vs/platform/instantiation/common/instantiationService.js +1 -8
- package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
- package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
- package/esm/vs/platform/list/browser/listService.js +27 -27
- package/esm/vs/platform/log/common/log.js +1 -1
- package/esm/vs/platform/log/common/log.js.map +1 -1
- package/esm/vs/platform/markers/common/markerService.js +6 -6
- 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/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 +7 -3
- package/esm/vs/platform/quickinput/browser/quickInput.js +19 -11
- package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
- package/esm/vs/platform/quickinput/browser/quickInputController.js +6 -6
- package/esm/vs/platform/quickinput/browser/quickInputList.js +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/theme/common/colorUtils.js +2 -2
- package/esm/vs/platform/theme/common/colors/baseColors.js +18 -17
- package/esm/vs/platform/theme/common/colors/baseColors.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
- package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
- package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
- 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 +9 -9
- 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 +21 -21
- package/esm/vs/platform/undoRedo/common/undoRedoService.js.map +1 -1
- package/esm/vs/platform/window/common/window.js +1 -1
- package/esm/vs/platform/window/common/window.js.map +1 -1
- package/esm/vs/platform/workspace/common/workspace.js +1 -1
- package/monaco.d.ts +34 -3
- package/package.json +2 -2
- package/version.txt +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js +0 -16
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js.map +0 -1
- package/esm/vs/platform/product/common/productService.js.map +0 -1
|
@@ -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":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AI,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;;AA5jBW,sBAAsB;IAkChC,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;GAvCR,sBAAsB,CA6jBlC","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 { 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\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});\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\tthis._sessionStore.add(this._editor.onDidChangeCursorPosition(() => {\n\t\t\t\tthis._showEndForLine = undefined;\n\t\t\t\tthis._renderStickyScroll(0);\n\t\t\t}));\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 (event.hasChanged(EditorOption.lineNumbers) || event.hasChanged(EditorOption.folding) || event.hasChanged(EditorOption.showFoldingControls)) {\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 { 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\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});\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\tthis._sessionStore.add(this._editor.onDidChangeCursorPosition(() => {\n\t\t\t\tthis._showEndForLine = undefined;\n\t\t\t\tthis._renderStickyScroll(0);\n\t\t\t}));\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 (event.hasChanged(EditorOption.lineNumbers) || event.hasChanged(EditorOption.folding) || event.hasChanged(EditorOption.showFoldingControls)) {\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,EA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I,CAAC,OAAO,CAAC,mBAAmB,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;gBAC/E,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;gBAC7E,IAAI,YAAY,GAAG,kBAAkB,IAAI,YAAY,IAAI,eAAe,EAAE,CAAC;oBAC1E,gBAAgB,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;;AApkBW,sBAAsB;IAmChC,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;GAxCR,sBAAsB,CAqkBlC","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\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});\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(() => {\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 (event.hasChanged(EditorOption.lineNumbers) || event.hasChanged(EditorOption.folding) || event.hasChanged(EditorOption.showFoldingControls)) {\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\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});\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(() => {\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 (event.hasChanged(EditorOption.lineNumbers) || event.hasChanged(EditorOption.folding) || event.hasChanged(EditorOption.showFoldingControls)) {\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"]}
|
|
@@ -237,6 +237,7 @@ export class StickyScrollWidget extends Disposable {
|
|
|
237
237
|
this._onDidChangeStickyScrollHeight.fire({ height: this._height });
|
|
238
238
|
}
|
|
239
239
|
_setFoldingHoverListeners() {
|
|
240
|
+
this._foldingIconStore.clear();
|
|
240
241
|
const showFoldingControls = this._editor.getOption(126 /* EditorOption.showFoldingControls */);
|
|
241
242
|
if (showFoldingControls !== 'mouseover') {
|
|
242
243
|
return;
|