monaco-editor-core 0.54.0-dev-20250910 → 0.54.0-dev-20250911
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.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.ru.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 +8 -2
- package/esm/vs/base/browser/domSanitize.js +32 -21
- package/esm/vs/base/browser/domSanitize.js.map +1 -1
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/common/codiconsLibrary.js +2 -0
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/editor/browser/config/editorConfiguration.js +1 -1
- package/esm/vs/editor/browser/controller/dragScrolling.js +4 -4
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +3 -3
- package/esm/vs/editor/browser/controller/editContext/native/screenReaderContentRich.js +3 -3
- package/esm/vs/editor/browser/controller/editContext/native/screenReaderSupport.js +6 -6
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +9 -9
- package/esm/vs/editor/browser/controller/mouseHandler.js +6 -6
- package/esm/vs/editor/browser/controller/mouseTarget.js +3 -3
- package/esm/vs/editor/browser/coreCommands.js +2 -2
- package/esm/vs/editor/browser/gpu/rectangleRenderer.js +1 -1
- package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -1
- package/esm/vs/editor/browser/observableCodeEditor.js +1 -1
- package/esm/vs/editor/browser/view/viewController.js +2 -2
- package/esm/vs/editor/browser/view/viewLayer.js +1 -1
- package/esm/vs/editor/browser/view/viewOverlays.js +4 -4
- package/esm/vs/editor/browser/view.js +5 -5
- package/esm/vs/editor/browser/viewParts/blockDecorations/blockDecorations.js +1 -1
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +3 -3
- package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +6 -6
- package/esm/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js +8 -8
- package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +2 -2
- package/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.js +2 -2
- package/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js +2 -2
- package/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js +2 -2
- package/esm/vs/editor/browser/viewParts/margin/margin.js +2 -2
- package/esm/vs/editor/browser/viewParts/minimap/minimap.js +5 -5
- package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +2 -2
- package/esm/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js +4 -4
- package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +3 -3
- package/esm/vs/editor/browser/viewParts/rulers/rulers.js +2 -2
- package/esm/vs/editor/browser/viewParts/rulersGpu/rulersGpu.js +1 -1
- package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +3 -3
- package/esm/vs/editor/browser/viewParts/selections/selections.js +2 -2
- package/esm/vs/editor/browser/viewParts/viewCursors/viewCursor.js +2 -2
- package/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.js +6 -6
- package/esm/vs/editor/browser/viewParts/viewLines/viewLineOptions.js +4 -4
- package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js +11 -11
- package/esm/vs/editor/browser/viewParts/viewLinesGpu/viewLinesGpu.js +1 -1
- package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js +2 -2
- package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js +4 -4
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +12 -12
- package/esm/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js +4 -4
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +3 -3
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/features/overviewRulerFeature.js +1 -1
- package/esm/vs/editor/common/config/editorOptions.js +155 -154
- package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
- package/esm/vs/editor/common/core/editorColorRegistry.js +68 -68
- package/esm/vs/editor/common/cursorCommon.js +19 -19
- package/esm/vs/editor/common/editorContextKeys.js +46 -46
- package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
- package/esm/vs/editor/common/languages.js +56 -56
- package/esm/vs/editor/common/model/editStack.js +1 -1
- package/esm/vs/editor/common/standalone/standaloneEnums.js +86 -85
- package/esm/vs/editor/common/standalone/standaloneEnums.js.map +1 -1
- package/esm/vs/editor/common/standaloneStrings.js +10 -10
- package/esm/vs/editor/common/viewLayout/viewLayout.js +15 -15
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
- package/esm/vs/editor/common/viewModel/monospaceLineBreaksComputer.js +1 -1
- package/esm/vs/editor/common/viewModel/viewModelImpl.js +14 -14
- package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
- package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
- package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
- package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +20 -20
- package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
- package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
- package/esm/vs/editor/contrib/codeAction/browser/codeActionModel.js +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
- package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js +3 -3
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerContribution.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +2 -2
- package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
- package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerParticipant.js +1 -1
- package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +12 -12
- package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +12 -12
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
- package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
- package/esm/vs/editor/contrib/find/browser/findController.js +17 -17
- package/esm/vs/editor/contrib/find/browser/findModel.js +6 -6
- package/esm/vs/editor/contrib/find/browser/findWidget.js +32 -32
- package/esm/vs/editor/contrib/folding/browser/folding.js +23 -23
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js.map +1 -1
- package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
- package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
- package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
- package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
- package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js +21 -11
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js.map +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +2 -2
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +4 -4
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
- package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
- package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
- package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +10 -10
- package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +6 -6
- package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +5 -5
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsLocations.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +19 -19
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +12 -12
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +5 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +5 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
- package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
- package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
- package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +32 -32
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +4 -4
- package/esm/vs/editor/contrib/links/browser/links.js +11 -11
- package/esm/vs/editor/contrib/links/browser/links.js.map +1 -1
- package/esm/vs/editor/contrib/longLinesHelper/browser/longLinesHelper.js +1 -1
- package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
- package/esm/vs/editor/contrib/middleScroll/browser/middleScrollController.js +1 -1
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +36 -36
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsModel.js +3 -3
- package/esm/vs/editor/contrib/parameterHints/browser/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/placeholderText/browser/placeholderTextContribution.js +1 -1
- package/esm/vs/editor/contrib/placeholderText/browser/placeholderTextContribution.js.map +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +5 -5
- package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
- package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +3 -3
- package/esm/vs/editor/contrib/rename/browser/rename.js +11 -11
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
- package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +5 -5
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetSession.js +2 -2
- package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +17 -24
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js.map +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider.js +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js +12 -3
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js.map +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +5 -5
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +14 -14
- package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/suggestModel.js +11 -11
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +23 -23
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +5 -5
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +5 -5
- package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +3 -3
- package/esm/vs/editor/contrib/suggest/browser/wordDistance.js +1 -1
- package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
- package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
- package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +27 -27
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +7 -7
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +4 -4
- package/esm/vs/editor/editor.api.d.ts +93 -85
- package/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js +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.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/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/history/browser/contextScopedHistoryWidget.js +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/markers/common/markerService.js +2 -2
- package/esm/vs/platform/markers/common/markers.js +6 -6
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +7 -7
- package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInput.js +20 -12
- package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputActions.js +42 -8
- package/esm/vs/platform/quickinput/browser/quickInputActions.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputController.js +6 -64
- package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
- 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/quickinput/common/quickInput.js.map +1 -1
- package/esm/vs/platform/theme/common/colorUtils.js +2 -2
- package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
- 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 +11 -11
- package/esm/vs/platform/theme/common/colors/miscColors.js +15 -15
- 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 +20 -20
- package/esm/vs/platform/workspace/common/workspace.js +1 -1
- package/monaco.d.ts +93 -85
- package/package.json +2 -2
- package/version.txt +1 -1
|
@@ -10,7 +10,7 @@ class LongLinesHelper extends Disposable {
|
|
|
10
10
|
super();
|
|
11
11
|
this._editor = _editor;
|
|
12
12
|
this._register(this._editor.onMouseDown((e) => {
|
|
13
|
-
const stopRenderingLineAfter = this._editor.getOption(
|
|
13
|
+
const stopRenderingLineAfter = this._editor.getOption(133 /* EditorOption.stopRenderingLineAfter */);
|
|
14
14
|
if (stopRenderingLineAfter >= 0 && e.target.type === 6 /* MouseTargetType.CONTENT_TEXT */ && e.target.position.column >= stopRenderingLineAfter) {
|
|
15
15
|
this._editor.updateOptions({
|
|
16
16
|
stopRenderingLineAfter: -1
|
|
@@ -28,7 +28,7 @@ import * as dom from '../../../../base/browser/dom.js';
|
|
|
28
28
|
let MessageController = class MessageController {
|
|
29
29
|
static { MessageController_1 = this; }
|
|
30
30
|
static { this.ID = 'editor.contrib.messageController'; }
|
|
31
|
-
static { this.MESSAGE_VISIBLE = new RawContextKey('messageVisible', false, nls.localize(
|
|
31
|
+
static { this.MESSAGE_VISIBLE = new RawContextKey('messageVisible', false, nls.localize(1275, 'Whether the editor is currently showing an inline message')); }
|
|
32
32
|
static get(editor) {
|
|
33
33
|
return editor.getContribution(MessageController_1.ID);
|
|
34
34
|
}
|
|
@@ -16,7 +16,7 @@ export class MiddleScrollController extends Disposable {
|
|
|
16
16
|
super();
|
|
17
17
|
this._editor = _editor;
|
|
18
18
|
const obsEditor = observableCodeEditor(this._editor);
|
|
19
|
-
const scrollOnMiddleClick = obsEditor.getOption(
|
|
19
|
+
const scrollOnMiddleClick = obsEditor.getOption(171 /* EditorOption.scrollOnMiddleClick */);
|
|
20
20
|
this._register(autorun(reader => {
|
|
21
21
|
if (!scrollOnMiddleClick.read(reader)) {
|
|
22
22
|
return;
|
|
@@ -32,7 +32,7 @@ function announceCursorChange(previousCursorState, cursorState) {
|
|
|
32
32
|
const cursorDiff = cursorState.filter(cs => !previousCursorState.find(pcs => pcs.equals(cs)));
|
|
33
33
|
if (cursorDiff.length >= 1) {
|
|
34
34
|
const cursorPositions = cursorDiff.map(cs => `line ${cs.viewState.position.lineNumber} column ${cs.viewState.position.column}`).join(', ');
|
|
35
|
-
const msg = cursorDiff.length === 1 ? nls.localize(
|
|
35
|
+
const msg = cursorDiff.length === 1 ? nls.localize(1276, "Cursor added: {0}", cursorPositions) : nls.localize(1277, "Cursors added: {0}", cursorPositions);
|
|
36
36
|
status(msg);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -40,7 +40,7 @@ export class InsertCursorAbove extends EditorAction {
|
|
|
40
40
|
constructor() {
|
|
41
41
|
super({
|
|
42
42
|
id: 'editor.action.insertCursorAbove',
|
|
43
|
-
label: nls.localize2(
|
|
43
|
+
label: nls.localize2(1286, "Add Cursor Above"),
|
|
44
44
|
precondition: undefined,
|
|
45
45
|
kbOpts: {
|
|
46
46
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -54,7 +54,7 @@ export class InsertCursorAbove extends EditorAction {
|
|
|
54
54
|
menuOpts: {
|
|
55
55
|
menuId: MenuId.MenubarSelectionMenu,
|
|
56
56
|
group: '3_multi',
|
|
57
|
-
title: nls.localize(
|
|
57
|
+
title: nls.localize(1278, "&&Add Cursor Above"),
|
|
58
58
|
order: 2
|
|
59
59
|
}
|
|
60
60
|
});
|
|
@@ -82,7 +82,7 @@ export class InsertCursorBelow extends EditorAction {
|
|
|
82
82
|
constructor() {
|
|
83
83
|
super({
|
|
84
84
|
id: 'editor.action.insertCursorBelow',
|
|
85
|
-
label: nls.localize2(
|
|
85
|
+
label: nls.localize2(1287, "Add Cursor Below"),
|
|
86
86
|
precondition: undefined,
|
|
87
87
|
kbOpts: {
|
|
88
88
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -96,7 +96,7 @@ export class InsertCursorBelow extends EditorAction {
|
|
|
96
96
|
menuOpts: {
|
|
97
97
|
menuId: MenuId.MenubarSelectionMenu,
|
|
98
98
|
group: '3_multi',
|
|
99
|
-
title: nls.localize(
|
|
99
|
+
title: nls.localize(1279, "A&&dd Cursor Below"),
|
|
100
100
|
order: 3
|
|
101
101
|
}
|
|
102
102
|
});
|
|
@@ -124,7 +124,7 @@ class InsertCursorAtEndOfEachLineSelected extends EditorAction {
|
|
|
124
124
|
constructor() {
|
|
125
125
|
super({
|
|
126
126
|
id: 'editor.action.insertCursorAtEndOfEachLineSelected',
|
|
127
|
-
label: nls.localize2(
|
|
127
|
+
label: nls.localize2(1288, "Add Cursors to Line Ends"),
|
|
128
128
|
precondition: undefined,
|
|
129
129
|
kbOpts: {
|
|
130
130
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -134,7 +134,7 @@ class InsertCursorAtEndOfEachLineSelected extends EditorAction {
|
|
|
134
134
|
menuOpts: {
|
|
135
135
|
menuId: MenuId.MenubarSelectionMenu,
|
|
136
136
|
group: '3_multi',
|
|
137
|
-
title: nls.localize(
|
|
137
|
+
title: nls.localize(1280, "Add C&&ursors to Line Ends"),
|
|
138
138
|
order: 4
|
|
139
139
|
}
|
|
140
140
|
});
|
|
@@ -171,7 +171,7 @@ class InsertCursorAtEndOfLineSelected extends EditorAction {
|
|
|
171
171
|
constructor() {
|
|
172
172
|
super({
|
|
173
173
|
id: 'editor.action.addCursorsToBottom',
|
|
174
|
-
label: nls.localize2(
|
|
174
|
+
label: nls.localize2(1289, "Add Cursors to Bottom"),
|
|
175
175
|
precondition: undefined
|
|
176
176
|
});
|
|
177
177
|
}
|
|
@@ -197,7 +197,7 @@ class InsertCursorAtTopOfLineSelected extends EditorAction {
|
|
|
197
197
|
constructor() {
|
|
198
198
|
super({
|
|
199
199
|
id: 'editor.action.addCursorsToTop',
|
|
200
|
-
label: nls.localize2(
|
|
200
|
+
label: nls.localize2(1290, "Add Cursors to Top"),
|
|
201
201
|
precondition: undefined
|
|
202
202
|
});
|
|
203
203
|
}
|
|
@@ -315,7 +315,7 @@ export class MultiCursorSession {
|
|
|
315
315
|
this.findController.highlightFindOptions();
|
|
316
316
|
const allSelections = this._editor.getSelections();
|
|
317
317
|
const lastAddedSelection = allSelections[allSelections.length - 1];
|
|
318
|
-
const nextMatch = this._editor.getModel().findNextMatch(this.searchText, lastAddedSelection.getEndPosition(), false, this.matchCase, this.wholeWord ? this._editor.getOption(
|
|
318
|
+
const nextMatch = this._editor.getModel().findNextMatch(this.searchText, lastAddedSelection.getEndPosition(), false, this.matchCase, this.wholeWord ? this._editor.getOption(148 /* EditorOption.wordSeparators */) : null, false);
|
|
319
319
|
if (!nextMatch) {
|
|
320
320
|
return null;
|
|
321
321
|
}
|
|
@@ -355,7 +355,7 @@ export class MultiCursorSession {
|
|
|
355
355
|
this.findController.highlightFindOptions();
|
|
356
356
|
const allSelections = this._editor.getSelections();
|
|
357
357
|
const lastAddedSelection = allSelections[allSelections.length - 1];
|
|
358
|
-
const previousMatch = this._editor.getModel().findPreviousMatch(this.searchText, lastAddedSelection.getStartPosition(), false, this.matchCase, this.wholeWord ? this._editor.getOption(
|
|
358
|
+
const previousMatch = this._editor.getModel().findPreviousMatch(this.searchText, lastAddedSelection.getStartPosition(), false, this.matchCase, this.wholeWord ? this._editor.getOption(148 /* EditorOption.wordSeparators */) : null, false);
|
|
359
359
|
if (!previousMatch) {
|
|
360
360
|
return null;
|
|
361
361
|
}
|
|
@@ -368,9 +368,9 @@ export class MultiCursorSession {
|
|
|
368
368
|
this.findController.highlightFindOptions();
|
|
369
369
|
const editorModel = this._editor.getModel();
|
|
370
370
|
if (searchScope) {
|
|
371
|
-
return editorModel.findMatches(this.searchText, searchScope, false, this.matchCase, this.wholeWord ? this._editor.getOption(
|
|
371
|
+
return editorModel.findMatches(this.searchText, searchScope, false, this.matchCase, this.wholeWord ? this._editor.getOption(148 /* EditorOption.wordSeparators */) : null, false, 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */);
|
|
372
372
|
}
|
|
373
|
-
return editorModel.findMatches(this.searchText, true, false, this.matchCase, this.wholeWord ? this._editor.getOption(
|
|
373
|
+
return editorModel.findMatches(this.searchText, true, false, this.matchCase, this.wholeWord ? this._editor.getOption(148 /* EditorOption.wordSeparators */) : null, false, 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */);
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
376
|
export class MultiCursorSelectionController extends Disposable {
|
|
@@ -518,10 +518,10 @@ export class MultiCursorSelectionController extends Disposable {
|
|
|
518
518
|
if (findState.isRevealed && findState.searchString.length > 0 && findState.isRegex) {
|
|
519
519
|
const editorModel = this._editor.getModel();
|
|
520
520
|
if (findState.searchScope) {
|
|
521
|
-
matches = editorModel.findMatches(findState.searchString, findState.searchScope, findState.isRegex, findState.matchCase, findState.wholeWord ? this._editor.getOption(
|
|
521
|
+
matches = editorModel.findMatches(findState.searchString, findState.searchScope, findState.isRegex, findState.matchCase, findState.wholeWord ? this._editor.getOption(148 /* EditorOption.wordSeparators */) : null, false, 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */);
|
|
522
522
|
}
|
|
523
523
|
else {
|
|
524
|
-
matches = editorModel.findMatches(findState.searchString, true, findState.isRegex, findState.matchCase, findState.wholeWord ? this._editor.getOption(
|
|
524
|
+
matches = editorModel.findMatches(findState.searchString, true, findState.isRegex, findState.matchCase, findState.wholeWord ? this._editor.getOption(148 /* EditorOption.wordSeparators */) : null, false, 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */);
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
527
|
else {
|
|
@@ -574,7 +574,7 @@ export class AddSelectionToNextFindMatchAction extends MultiCursorSelectionContr
|
|
|
574
574
|
constructor() {
|
|
575
575
|
super({
|
|
576
576
|
id: 'editor.action.addSelectionToNextFindMatch',
|
|
577
|
-
label: nls.localize2(
|
|
577
|
+
label: nls.localize2(1291, "Add Selection to Next Find Match"),
|
|
578
578
|
precondition: undefined,
|
|
579
579
|
kbOpts: {
|
|
580
580
|
kbExpr: EditorContextKeys.focus,
|
|
@@ -584,7 +584,7 @@ export class AddSelectionToNextFindMatchAction extends MultiCursorSelectionContr
|
|
|
584
584
|
menuOpts: {
|
|
585
585
|
menuId: MenuId.MenubarSelectionMenu,
|
|
586
586
|
group: '3_multi',
|
|
587
|
-
title: nls.localize(
|
|
587
|
+
title: nls.localize(1281, "Add &&Next Occurrence"),
|
|
588
588
|
order: 5
|
|
589
589
|
}
|
|
590
590
|
});
|
|
@@ -597,12 +597,12 @@ export class AddSelectionToPreviousFindMatchAction extends MultiCursorSelectionC
|
|
|
597
597
|
constructor() {
|
|
598
598
|
super({
|
|
599
599
|
id: 'editor.action.addSelectionToPreviousFindMatch',
|
|
600
|
-
label: nls.localize2(
|
|
600
|
+
label: nls.localize2(1292, "Add Selection to Previous Find Match"),
|
|
601
601
|
precondition: undefined,
|
|
602
602
|
menuOpts: {
|
|
603
603
|
menuId: MenuId.MenubarSelectionMenu,
|
|
604
604
|
group: '3_multi',
|
|
605
|
-
title: nls.localize(
|
|
605
|
+
title: nls.localize(1282, "Add P&&revious Occurrence"),
|
|
606
606
|
order: 6
|
|
607
607
|
}
|
|
608
608
|
});
|
|
@@ -615,7 +615,7 @@ export class MoveSelectionToNextFindMatchAction extends MultiCursorSelectionCont
|
|
|
615
615
|
constructor() {
|
|
616
616
|
super({
|
|
617
617
|
id: 'editor.action.moveSelectionToNextFindMatch',
|
|
618
|
-
label: nls.localize2(
|
|
618
|
+
label: nls.localize2(1293, "Move Last Selection to Next Find Match"),
|
|
619
619
|
precondition: undefined,
|
|
620
620
|
kbOpts: {
|
|
621
621
|
kbExpr: EditorContextKeys.focus,
|
|
@@ -632,7 +632,7 @@ export class MoveSelectionToPreviousFindMatchAction extends MultiCursorSelection
|
|
|
632
632
|
constructor() {
|
|
633
633
|
super({
|
|
634
634
|
id: 'editor.action.moveSelectionToPreviousFindMatch',
|
|
635
|
-
label: nls.localize2(
|
|
635
|
+
label: nls.localize2(1294, "Move Last Selection to Previous Find Match"),
|
|
636
636
|
precondition: undefined
|
|
637
637
|
});
|
|
638
638
|
}
|
|
@@ -644,7 +644,7 @@ export class SelectHighlightsAction extends MultiCursorSelectionControllerAction
|
|
|
644
644
|
constructor() {
|
|
645
645
|
super({
|
|
646
646
|
id: 'editor.action.selectHighlights',
|
|
647
|
-
label: nls.localize2(
|
|
647
|
+
label: nls.localize2(1295, "Select All Occurrences of Find Match"),
|
|
648
648
|
precondition: undefined,
|
|
649
649
|
kbOpts: {
|
|
650
650
|
kbExpr: EditorContextKeys.focus,
|
|
@@ -654,7 +654,7 @@ export class SelectHighlightsAction extends MultiCursorSelectionControllerAction
|
|
|
654
654
|
menuOpts: {
|
|
655
655
|
menuId: MenuId.MenubarSelectionMenu,
|
|
656
656
|
group: '3_multi',
|
|
657
|
-
title: nls.localize(
|
|
657
|
+
title: nls.localize(1283, "Select All &&Occurrences"),
|
|
658
658
|
order: 7
|
|
659
659
|
}
|
|
660
660
|
});
|
|
@@ -667,7 +667,7 @@ export class CompatChangeAll extends MultiCursorSelectionControllerAction {
|
|
|
667
667
|
constructor() {
|
|
668
668
|
super({
|
|
669
669
|
id: 'editor.action.changeAll',
|
|
670
|
-
label: nls.localize2(
|
|
670
|
+
label: nls.localize2(1296, "Change All Occurrences"),
|
|
671
671
|
precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.editorTextFocus),
|
|
672
672
|
kbOpts: {
|
|
673
673
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -716,16 +716,16 @@ let SelectionHighlighter = class SelectionHighlighter extends Disposable {
|
|
|
716
716
|
super();
|
|
717
717
|
this._languageFeaturesService = _languageFeaturesService;
|
|
718
718
|
this.editor = editor;
|
|
719
|
-
this._isEnabled = editor.getOption(
|
|
720
|
-
this._isEnabledMultiline = editor.getOption(
|
|
721
|
-
this._maxLength = editor.getOption(
|
|
719
|
+
this._isEnabled = editor.getOption(122 /* EditorOption.selectionHighlight */);
|
|
720
|
+
this._isEnabledMultiline = editor.getOption(124 /* EditorOption.selectionHighlightMultiline */);
|
|
721
|
+
this._maxLength = editor.getOption(123 /* EditorOption.selectionHighlightMaxLength */);
|
|
722
722
|
this._decorations = editor.createDecorationsCollection();
|
|
723
723
|
this.updateSoon = this._register(new RunOnceScheduler(() => this._update(), 300));
|
|
724
724
|
this.state = null;
|
|
725
725
|
this._register(editor.onDidChangeConfiguration((e) => {
|
|
726
|
-
this._isEnabled = editor.getOption(
|
|
727
|
-
this._isEnabledMultiline = editor.getOption(
|
|
728
|
-
this._maxLength = editor.getOption(
|
|
726
|
+
this._isEnabled = editor.getOption(122 /* EditorOption.selectionHighlight */);
|
|
727
|
+
this._isEnabledMultiline = editor.getOption(124 /* EditorOption.selectionHighlightMultiline */);
|
|
728
|
+
this._maxLength = editor.getOption(123 /* EditorOption.selectionHighlightMaxLength */);
|
|
729
729
|
}));
|
|
730
730
|
this._register(editor.onDidChangeCursorSelection((e) => {
|
|
731
731
|
if (!this._isEnabled) {
|
|
@@ -836,7 +836,7 @@ let SelectionHighlighter = class SelectionHighlighter extends Disposable {
|
|
|
836
836
|
return null;
|
|
837
837
|
}
|
|
838
838
|
}
|
|
839
|
-
return new SelectionHighlighterState(editor.getModel(), r.searchText, r.matchCase, r.wholeWord ? editor.getOption(
|
|
839
|
+
return new SelectionHighlighterState(editor.getModel(), r.searchText, r.matchCase, r.wholeWord ? editor.getOption(148 /* EditorOption.wordSeparators */) : null, oldState);
|
|
840
840
|
}
|
|
841
841
|
_setState(newState) {
|
|
842
842
|
this.state = newState;
|
|
@@ -884,7 +884,7 @@ let SelectionHighlighter = class SelectionHighlighter extends Disposable {
|
|
|
884
884
|
}
|
|
885
885
|
}
|
|
886
886
|
}
|
|
887
|
-
const occurrenceHighlighting = this.editor.getOption(
|
|
887
|
+
const occurrenceHighlighting = this.editor.getOption(90 /* EditorOption.occurrencesHighlight */) !== 'off';
|
|
888
888
|
const hasSemanticHighlights = this._languageFeaturesService.documentHighlightProvider.has(model) && occurrenceHighlighting;
|
|
889
889
|
const decorations = matches.map(r => {
|
|
890
890
|
return {
|
|
@@ -925,9 +925,9 @@ export class FocusNextCursor extends EditorAction {
|
|
|
925
925
|
constructor() {
|
|
926
926
|
super({
|
|
927
927
|
id: 'editor.action.focusNextCursor',
|
|
928
|
-
label: nls.localize2(
|
|
928
|
+
label: nls.localize2(1297, "Focus Next Cursor"),
|
|
929
929
|
metadata: {
|
|
930
|
-
description: nls.localize(
|
|
930
|
+
description: nls.localize(1284, "Focuses the next cursor"),
|
|
931
931
|
args: [],
|
|
932
932
|
},
|
|
933
933
|
precondition: undefined
|
|
@@ -957,9 +957,9 @@ export class FocusPreviousCursor extends EditorAction {
|
|
|
957
957
|
constructor() {
|
|
958
958
|
super({
|
|
959
959
|
id: 'editor.action.focusPreviousCursor',
|
|
960
|
-
label: nls.localize2(
|
|
960
|
+
label: nls.localize2(1298, "Focus Previous Cursor"),
|
|
961
961
|
metadata: {
|
|
962
|
-
description: nls.localize(
|
|
962
|
+
description: nls.localize(1285, "Focuses the previous cursor"),
|
|
963
963
|
args: [],
|
|
964
964
|
},
|
|
965
965
|
precondition: undefined
|
|
@@ -67,7 +67,7 @@ export class TriggerParameterHintsAction extends EditorAction {
|
|
|
67
67
|
constructor() {
|
|
68
68
|
super({
|
|
69
69
|
id: 'editor.action.triggerParameterHints',
|
|
70
|
-
label: nls.localize2(
|
|
70
|
+
label: nls.localize2(1299, "Trigger Parameter Hints"),
|
|
71
71
|
precondition: EditorContextKeys.hasSignatureHelpProvider,
|
|
72
72
|
kbOpts: {
|
|
73
73
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -88,7 +88,7 @@ export class ParameterHintsModel extends Disposable {
|
|
|
88
88
|
const length = this.state.hints.signatures.length;
|
|
89
89
|
const activeSignature = this.state.hints.activeSignature;
|
|
90
90
|
const last = (activeSignature % length) === (length - 1);
|
|
91
|
-
const cycle = this.editor.getOption(
|
|
91
|
+
const cycle = this.editor.getOption(98 /* EditorOption.parameterHints */).cycle;
|
|
92
92
|
// If there is only one signature, or we're on last signature of list
|
|
93
93
|
if ((length < 2 || last) && !cycle) {
|
|
94
94
|
this.cancel();
|
|
@@ -103,7 +103,7 @@ export class ParameterHintsModel extends Disposable {
|
|
|
103
103
|
const length = this.state.hints.signatures.length;
|
|
104
104
|
const activeSignature = this.state.hints.activeSignature;
|
|
105
105
|
const first = activeSignature === 0;
|
|
106
|
-
const cycle = this.editor.getOption(
|
|
106
|
+
const cycle = this.editor.getOption(98 /* EditorOption.parameterHints */).cycle;
|
|
107
107
|
// If there is only one signature, or we're on first signature of list
|
|
108
108
|
if ((length < 2 || first) && !cycle) {
|
|
109
109
|
this.cancel();
|
|
@@ -230,7 +230,7 @@ export class ParameterHintsModel extends Disposable {
|
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
onEditorConfigurationChange() {
|
|
233
|
-
this.triggerOnType = this.editor.getOption(
|
|
233
|
+
this.triggerOnType = this.editor.getOption(98 /* EditorOption.parameterHints */).enabled;
|
|
234
234
|
if (!this.triggerOnType) {
|
|
235
235
|
this.cancel();
|
|
236
236
|
}
|
|
@@ -32,8 +32,8 @@ import { listHighlightForeground, registerColor } from '../../../../platform/the
|
|
|
32
32
|
import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';
|
|
33
33
|
import { ThemeIcon } from '../../../../base/common/themables.js';
|
|
34
34
|
const $ = dom.$;
|
|
35
|
-
const parameterHintsNextIcon = registerIcon('parameter-hints-next', Codicon.chevronDown, nls.localize(
|
|
36
|
-
const parameterHintsPreviousIcon = registerIcon('parameter-hints-previous', Codicon.chevronUp, nls.localize(
|
|
35
|
+
const parameterHintsNextIcon = registerIcon('parameter-hints-next', Codicon.chevronDown, nls.localize(1300, 'Icon for show next parameter hint.'));
|
|
36
|
+
const parameterHintsPreviousIcon = registerIcon('parameter-hints-previous', Codicon.chevronUp, nls.localize(1301, 'Icon for show previous parameter hint.'));
|
|
37
37
|
let ParameterHintsWidget = class ParameterHintsWidget extends Disposable {
|
|
38
38
|
static { ParameterHintsWidget_1 = this; }
|
|
39
39
|
static { this.ID = 'editor.widget.parameterHintsWidget'; }
|
|
@@ -208,7 +208,7 @@ let ParameterHintsWidget = class ParameterHintsWidget extends Disposable {
|
|
|
208
208
|
// Select method gets called on every user type while parameter hints are visible.
|
|
209
209
|
// We do not want to spam the user with same announcements, so we only announce if the current parameter changed.
|
|
210
210
|
if (this.announcedLabel !== labelToAnnounce) {
|
|
211
|
-
aria.alert(nls.localize(
|
|
211
|
+
aria.alert(nls.localize(1302, "{0}, hint", labelToAnnounce));
|
|
212
212
|
this.announcedLabel = labelToAnnounce;
|
|
213
213
|
}
|
|
214
214
|
}
|
|
@@ -306,5 +306,5 @@ ParameterHintsWidget = ParameterHintsWidget_1 = __decorate([
|
|
|
306
306
|
__param(4, ILanguageService)
|
|
307
307
|
], ParameterHintsWidget);
|
|
308
308
|
export { ParameterHintsWidget };
|
|
309
|
-
registerColor('editorHoverWidget.highlightForeground', listHighlightForeground, nls.localize(
|
|
309
|
+
registerColor('editorHoverWidget.highlightForeground', listHighlightForeground, nls.localize(1303, 'Foreground color of the active item in the parameter hint.'));
|
|
310
310
|
//# sourceMappingURL=parameterHintsWidget.js.map
|
|
@@ -53,7 +53,7 @@ registerSingleton(IPeekViewService, class {
|
|
|
53
53
|
}, 1 /* InstantiationType.Delayed */);
|
|
54
54
|
export var PeekContext;
|
|
55
55
|
(function (PeekContext) {
|
|
56
|
-
PeekContext.inPeekEditor = new RawContextKey('inReferenceSearchEditor', true, nls.localize(
|
|
56
|
+
PeekContext.inPeekEditor = new RawContextKey('inReferenceSearchEditor', true, nls.localize(1304, "Whether the current code editor is embedded inside peek"));
|
|
57
57
|
PeekContext.notInPeekEditor = PeekContext.inPeekEditor.toNegated();
|
|
58
58
|
})(PeekContext || (PeekContext = {}));
|
|
59
59
|
let PeekContextController = class PeekContextController {
|
|
@@ -149,7 +149,7 @@ let PeekViewWidget = class PeekViewWidget extends ZoneWidget {
|
|
|
149
149
|
this._actionbarWidget = new ActionBar(actionsContainer, actionBarOptions);
|
|
150
150
|
this._disposables.add(this._actionbarWidget);
|
|
151
151
|
if (!noCloseAction) {
|
|
152
|
-
this._actionbarWidget.push(this._disposables.add(new Action('peekview.close', nls.localize(
|
|
152
|
+
this._actionbarWidget.push(this._disposables.add(new Action('peekview.close', nls.localize(1305, "Close"), ThemeIcon.asClassName(Codicon.close), true, () => {
|
|
153
153
|
this.dispose();
|
|
154
154
|
return Promise.resolve();
|
|
155
155
|
})), { label: false, icon: true });
|
|
@@ -216,20 +216,20 @@ PeekViewWidget = __decorate([
|
|
|
216
216
|
__param(2, IInstantiationService)
|
|
217
217
|
], PeekViewWidget);
|
|
218
218
|
export { PeekViewWidget };
|
|
219
|
-
export const peekViewTitleBackground = registerColor('peekViewTitle.background', { dark: '#252526', light: '#F3F3F3', hcDark: Color.black, hcLight: Color.white }, nls.localize(
|
|
220
|
-
export const peekViewTitleForeground = registerColor('peekViewTitleLabel.foreground', { dark: Color.white, light: Color.black, hcDark: Color.white, hcLight: editorForeground }, nls.localize(
|
|
221
|
-
export const peekViewTitleInfoForeground = registerColor('peekViewTitleDescription.foreground', { dark: '#ccccccb3', light: '#616161', hcDark: '#FFFFFF99', hcLight: '#292929' }, nls.localize(
|
|
222
|
-
export const peekViewBorder = registerColor('peekView.border', { dark: editorInfoForeground, light: editorInfoForeground, hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize(
|
|
223
|
-
export const peekViewResultsBackground = registerColor('peekViewResult.background', { dark: '#252526', light: '#F3F3F3', hcDark: Color.black, hcLight: Color.white }, nls.localize(
|
|
224
|
-
export const peekViewResultsMatchForeground = registerColor('peekViewResult.lineForeground', { dark: '#bbbbbb', light: '#646465', hcDark: Color.white, hcLight: editorForeground }, nls.localize(
|
|
225
|
-
export const peekViewResultsFileForeground = registerColor('peekViewResult.fileForeground', { dark: Color.white, light: '#1E1E1E', hcDark: Color.white, hcLight: editorForeground }, nls.localize(
|
|
226
|
-
export const peekViewResultsSelectionBackground = registerColor('peekViewResult.selectionBackground', { dark: '#3399ff33', light: '#3399ff33', hcDark: null, hcLight: null }, nls.localize(
|
|
227
|
-
export const peekViewResultsSelectionForeground = registerColor('peekViewResult.selectionForeground', { dark: Color.white, light: '#6C6C6C', hcDark: Color.white, hcLight: editorForeground }, nls.localize(
|
|
228
|
-
export const peekViewEditorBackground = registerColor('peekViewEditor.background', { dark: '#001F33', light: '#F2F8FC', hcDark: Color.black, hcLight: Color.white }, nls.localize(
|
|
229
|
-
export const peekViewEditorGutterBackground = registerColor('peekViewEditorGutter.background', peekViewEditorBackground, nls.localize(
|
|
230
|
-
export const peekViewEditorStickyScrollBackground = registerColor('peekViewEditorStickyScroll.background', peekViewEditorBackground, nls.localize(
|
|
231
|
-
export const peekViewEditorStickyScrollGutterBackground = registerColor('peekViewEditorStickyScrollGutter.background', peekViewEditorBackground, nls.localize(
|
|
232
|
-
export const peekViewResultsMatchHighlight = registerColor('peekViewResult.matchHighlightBackground', { dark: '#ea5c004d', light: '#ea5c004d', hcDark: null, hcLight: null }, nls.localize(
|
|
233
|
-
export const peekViewEditorMatchHighlight = registerColor('peekViewEditor.matchHighlightBackground', { dark: '#ff8f0099', light: '#f5d802de', hcDark: null, hcLight: null }, nls.localize(
|
|
234
|
-
export const peekViewEditorMatchHighlightBorder = registerColor('peekViewEditor.matchHighlightBorder', { dark: null, light: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, nls.localize(
|
|
219
|
+
export const peekViewTitleBackground = registerColor('peekViewTitle.background', { dark: '#252526', light: '#F3F3F3', hcDark: Color.black, hcLight: Color.white }, nls.localize(1306, 'Background color of the peek view title area.'));
|
|
220
|
+
export const peekViewTitleForeground = registerColor('peekViewTitleLabel.foreground', { dark: Color.white, light: Color.black, hcDark: Color.white, hcLight: editorForeground }, nls.localize(1307, 'Color of the peek view title.'));
|
|
221
|
+
export const peekViewTitleInfoForeground = registerColor('peekViewTitleDescription.foreground', { dark: '#ccccccb3', light: '#616161', hcDark: '#FFFFFF99', hcLight: '#292929' }, nls.localize(1308, 'Color of the peek view title info.'));
|
|
222
|
+
export const peekViewBorder = registerColor('peekView.border', { dark: editorInfoForeground, light: editorInfoForeground, hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize(1309, 'Color of the peek view borders and arrow.'));
|
|
223
|
+
export const peekViewResultsBackground = registerColor('peekViewResult.background', { dark: '#252526', light: '#F3F3F3', hcDark: Color.black, hcLight: Color.white }, nls.localize(1310, 'Background color of the peek view result list.'));
|
|
224
|
+
export const peekViewResultsMatchForeground = registerColor('peekViewResult.lineForeground', { dark: '#bbbbbb', light: '#646465', hcDark: Color.white, hcLight: editorForeground }, nls.localize(1311, 'Foreground color for line nodes in the peek view result list.'));
|
|
225
|
+
export const peekViewResultsFileForeground = registerColor('peekViewResult.fileForeground', { dark: Color.white, light: '#1E1E1E', hcDark: Color.white, hcLight: editorForeground }, nls.localize(1312, 'Foreground color for file nodes in the peek view result list.'));
|
|
226
|
+
export const peekViewResultsSelectionBackground = registerColor('peekViewResult.selectionBackground', { dark: '#3399ff33', light: '#3399ff33', hcDark: null, hcLight: null }, nls.localize(1313, 'Background color of the selected entry in the peek view result list.'));
|
|
227
|
+
export const peekViewResultsSelectionForeground = registerColor('peekViewResult.selectionForeground', { dark: Color.white, light: '#6C6C6C', hcDark: Color.white, hcLight: editorForeground }, nls.localize(1314, 'Foreground color of the selected entry in the peek view result list.'));
|
|
228
|
+
export const peekViewEditorBackground = registerColor('peekViewEditor.background', { dark: '#001F33', light: '#F2F8FC', hcDark: Color.black, hcLight: Color.white }, nls.localize(1315, 'Background color of the peek view editor.'));
|
|
229
|
+
export const peekViewEditorGutterBackground = registerColor('peekViewEditorGutter.background', peekViewEditorBackground, nls.localize(1316, 'Background color of the gutter in the peek view editor.'));
|
|
230
|
+
export const peekViewEditorStickyScrollBackground = registerColor('peekViewEditorStickyScroll.background', peekViewEditorBackground, nls.localize(1317, 'Background color of sticky scroll in the peek view editor.'));
|
|
231
|
+
export const peekViewEditorStickyScrollGutterBackground = registerColor('peekViewEditorStickyScrollGutter.background', peekViewEditorBackground, nls.localize(1318, 'Background color of the gutter part of sticky scroll in the peek view editor.'));
|
|
232
|
+
export const peekViewResultsMatchHighlight = registerColor('peekViewResult.matchHighlightBackground', { dark: '#ea5c004d', light: '#ea5c004d', hcDark: null, hcLight: null }, nls.localize(1319, 'Match highlight color in the peek view result list.'));
|
|
233
|
+
export const peekViewEditorMatchHighlight = registerColor('peekViewEditor.matchHighlightBackground', { dark: '#ff8f0099', light: '#f5d802de', hcDark: null, hcLight: null }, nls.localize(1320, 'Match highlight color in the peek view editor.'));
|
|
234
|
+
export const peekViewEditorMatchHighlightBorder = registerColor('peekViewEditor.matchHighlightBorder', { dark: null, light: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, nls.localize(1321, 'Match highlight border in the peek view editor.'));
|
|
235
235
|
//# sourceMappingURL=peekView.js.map
|
|
@@ -10,5 +10,5 @@ import { registerColor } from '../../../../platform/theme/common/colorUtils.js';
|
|
|
10
10
|
import { PlaceholderTextContribution } from './placeholderTextContribution.js';
|
|
11
11
|
import { wrapInReloadableClass1 } from '../../../../platform/observable/common/wrapInReloadableClass.js';
|
|
12
12
|
registerEditorContribution(PlaceholderTextContribution.ID, wrapInReloadableClass1(() => PlaceholderTextContribution), 0 /* EditorContributionInstantiation.Eager */);
|
|
13
|
-
registerColor('editor.placeholder.foreground', ghostTextForeground, localize(
|
|
13
|
+
registerColor('editor.placeholder.foreground', ghostTextForeground, localize(1322, 'Foreground color of the placeholder text in the editor.'));
|
|
14
14
|
//# sourceMappingURL=placeholderText.contribution.js.map
|
|
@@ -16,7 +16,7 @@ export class PlaceholderTextContribution extends Disposable {
|
|
|
16
16
|
super();
|
|
17
17
|
this._editor = _editor;
|
|
18
18
|
this._editorObs = observableCodeEditor(this._editor);
|
|
19
|
-
this._placeholderText = this._editorObs.getOption(
|
|
19
|
+
this._placeholderText = this._editorObs.getOption(100 /* EditorOption.placeholder */);
|
|
20
20
|
this._state = derivedOpts({ owner: this, equalsFn: structuralEquals }, reader => {
|
|
21
21
|
const p = this._placeholderText.read(reader);
|
|
22
22
|
if (!p) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/placeholderText/browser/placeholderTextContribution.ts","vs/editor/contrib/placeholderText/browser/placeholderTextContribution.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,CAAC,EAAE,MAAM,iCAAiC,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAc,0BAA0B,EAAE,WAAW,EAAE,OAAO,EAAwB,MAAM,uCAAuC,CAAC;AAErK,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAIhF;;EAEE;AACF,MAAM,OAAO,2BAA4B,SAAQ,UAAU;aAEnC,OAAE,GAAG,gCAAgC,CAAC;IAW7D,YACkB,OAAoB;QAErC,KAAK,EAAE,CAAC;QAFS,YAAO,GAAP,OAAO,CAAa;QAGrC,IAAI,CAAC,UAAU,GAAG,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACrD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,mCAA0B,CAAC;QAC5E,IAAI,CAAC,MAAM,GAAG,WAAW,CAAsC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,gBAAgB,EAAE,EAAE,MAAM,CAAC,EAAE;YACpH,MAAM,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC7C,IAAI,CAAC,CAAC,EAAE,CAAC;gBAAC,OAAO,SAAS,CAAC;YAAC,CAAC;YAC7B,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;gBAAC,OAAO,S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,SAAS,EAAE,EAAE;QACvE,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;YAAC,OAAO,IAAI,CAAC;QAAC,CAAC;QACxC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;IACnB,CAAC,CAAC,CAAC;AACJ,CAAC","file":"placeholderTextContribution.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 { h } from '../../../../base/browser/dom.js';\nimport { structuralEquals } from '../../../../base/common/equals.js';\nimport { Disposable } from '../../../../base/common/lifecycle.js';\nimport { autorun, constObservable, DebugOwner, derivedObservableWithCache, derivedOpts, derived, IObservable, IReader } from '../../../../base/common/observable.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../browser/observableCodeEditor.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { IEditorContribution } from '../../../common/editorCommon.js';\n\n/**\n * Use the editor option to set the placeholder text.\n*/\nexport class PlaceholderTextContribution extends Disposable implements IEditorContribution {\n\n\tpublic static readonly ID = 'editor.contrib.placeholderText';\n\tprivate readonly _editorObs;\n\n\tprivate readonly _placeholderText;\n\n\tprivate readonly _state;\n\n\tprivate readonly _shouldViewBeAlive;\n\n\tprivate readonly _view;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t) {\n\t\tsuper();\n\t\tthis._editorObs = observableCodeEditor(this._editor);\n\t\tthis._placeholderText = this._editorObs.getOption(EditorOption.placeholder);\n\t\tthis._state = derivedOpts<{ placeholder: string } | undefined>({ owner: this, equalsFn: structuralEquals }, reader => {\n\t\t\tconst p = this._placeholderText.read(reader);\n\t\t\tif (!p) { return undefined; }\n\t\t\tif (!this._editorObs.valueIsEmpty.read(reader)) { return undefined; }\n\t\t\treturn { placeholder: p };\n\t\t});\n\t\tthis._shouldViewBeAlive = isOrWasTrue(this, reader => this._state.read(reader)?.placeholder !== undefined);\n\t\tthis._view = derived((reader) => {\n\t\t\tif (!this._shouldViewBeAlive.read(reader)) { return; }\n\n\t\t\tconst element = h('div.editorPlaceholder');\n\n\t\t\treader.store.add(autorun(reader => {\n\t\t\t\tconst data = this._state.read(reader);\n\t\t\t\tconst shouldBeVisibile = data?.placeholder !== undefined;\n\t\t\t\telement.root.style.display = shouldBeVisibile ? 'block' : 'none';\n\t\t\t\telement.root.innerText = data?.placeholder ?? '';\n\t\t\t}));\n\t\t\treader.store.add(autorun(reader => {\n\t\t\t\tconst info = this._editorObs.layoutInfo.read(reader);\n\t\t\t\telement.root.style.left = `${info.contentLeft}px`;\n\t\t\t\telement.root.style.width = (info.contentWidth - info.verticalScrollbarWidth) + 'px';\n\t\t\t\telement.root.style.top = `${this._editor.getTopForLineNumber(0)}px`;\n\t\t\t}));\n\t\t\treader.store.add(autorun(reader => {\n\t\t\t\telement.root.style.fontFamily = this._editorObs.getOption(EditorOption.fontFamily).read(reader);\n\t\t\t\telement.root.style.fontSize = this._editorObs.getOption(EditorOption.fontSize).read(reader) + 'px';\n\t\t\t\telement.root.style.lineHeight = this._editorObs.getOption(EditorOption.lineHeight).read(reader) + 'px';\n\t\t\t}));\n\t\t\treader.store.add(this._editorObs.createOverlayWidget({\n\t\t\t\tallowEditorOverflow: false,\n\t\t\t\tminContentWidthInPx: constObservable(0),\n\t\t\t\tposition: constObservable(null),\n\t\t\t\tdomNode: element.root,\n\t\t\t}));\n\t\t});\n\t\tthis._view.recomputeInitiallyAndOnChange(this._store);\n\t}\n}\n\nfunction isOrWasTrue(owner: DebugOwner, fn: (reader: IReader) => boolean): IObservable<boolean> {\n\treturn derivedObservableWithCache<boolean>(owner, (reader, lastValue) => {\n\t\tif (lastValue === true) { return true; }\n\t\treturn fn(reader);\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 { h } from '../../../../base/browser/dom.js';\nimport { structuralEquals } from '../../../../base/common/equals.js';\nimport { Disposable } from '../../../../base/common/lifecycle.js';\nimport { autorun, constObservable, DebugOwner, derivedObservableWithCache, derivedOpts, derived, IObservable, IReader } from '../../../../base/common/observable.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../browser/observableCodeEditor.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { IEditorContribution } from '../../../common/editorCommon.js';\n\n/**\n * Use the editor option to set the placeholder text.\n*/\nexport class PlaceholderTextContribution extends Disposable implements IEditorContribution {\n\n\tpublic static readonly ID = 'editor.contrib.placeholderText';\n\tprivate readonly _editorObs;\n\n\tprivate readonly _placeholderText;\n\n\tprivate readonly _state;\n\n\tprivate readonly _shouldViewBeAlive;\n\n\tprivate readonly _view;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t) {\n\t\tsuper();\n\t\tthis._editorObs = observableCodeEditor(this._editor);\n\t\tthis._placeholderText = this._editorObs.getOption(EditorOption.placeholder);\n\t\tthis._state = derivedOpts<{ placeholder: string } | undefined>({ owner: this, equalsFn: structuralEquals }, reader => {\n\t\t\tconst p = this._placeholderText.read(reader);\n\t\t\tif (!p) { return undefined; }\n\t\t\tif (!this._editorObs.valueIsEmpty.read(reader)) { return undefined; }\n\t\t\treturn { placeholder: p };\n\t\t});\n\t\tthis._shouldViewBeAlive = isOrWasTrue(this, reader => this._state.read(reader)?.placeholder !== undefined);\n\t\tthis._view = derived((reader) => {\n\t\t\tif (!this._shouldViewBeAlive.read(reader)) { return; }\n\n\t\t\tconst element = h('div.editorPlaceholder');\n\n\t\t\treader.store.add(autorun(reader => {\n\t\t\t\tconst data = this._state.read(reader);\n\t\t\t\tconst shouldBeVisibile = data?.placeholder !== undefined;\n\t\t\t\telement.root.style.display = shouldBeVisibile ? 'block' : 'none';\n\t\t\t\telement.root.innerText = data?.placeholder ?? '';\n\t\t\t}));\n\t\t\treader.store.add(autorun(reader => {\n\t\t\t\tconst info = this._editorObs.layoutInfo.read(reader);\n\t\t\t\telement.root.style.left = `${info.contentLeft}px`;\n\t\t\t\telement.root.style.width = (info.contentWidth - info.verticalScrollbarWidth) + 'px';\n\t\t\t\telement.root.style.top = `${this._editor.getTopForLineNumber(0)}px`;\n\t\t\t}));\n\t\t\treader.store.add(autorun(reader => {\n\t\t\t\telement.root.style.fontFamily = this._editorObs.getOption(EditorOption.fontFamily).read(reader);\n\t\t\t\telement.root.style.fontSize = this._editorObs.getOption(EditorOption.fontSize).read(reader) + 'px';\n\t\t\t\telement.root.style.lineHeight = this._editorObs.getOption(EditorOption.lineHeight).read(reader) + 'px';\n\t\t\t}));\n\t\t\treader.store.add(this._editorObs.createOverlayWidget({\n\t\t\t\tallowEditorOverflow: false,\n\t\t\t\tminContentWidthInPx: constObservable(0),\n\t\t\t\tposition: constObservable(null),\n\t\t\t\tdomNode: element.root,\n\t\t\t}));\n\t\t});\n\t\tthis._view.recomputeInitiallyAndOnChange(this._store);\n\t}\n}\n\nfunction isOrWasTrue(owner: DebugOwner, fn: (reader: IReader) => boolean): IObservable<boolean> {\n\treturn derivedObservableWithCache<boolean>(owner, (reader, lastValue) => {\n\t\tif (lastValue === true) { return true; }\n\t\treturn fn(reader);\n\t});\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/placeholderText/browser/placeholderTextContribution.ts","vs/editor/contrib/placeholderText/browser/placeholderTextContribution.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,CAAC,EAAE,MAAM,iCAAiC,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,OAA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AS,kCAAyB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAChG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,gCAAuB,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;gBACnG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,kCAAyB,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;YACxG,CAAC,CAAC,CAAC,CAAC;YACJ,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC;gBACpD,mBAAmB,EAAE,KAAK;gBAC1B,mBAAmB,EAAE,eAAe,CAAC,CAAC,CAAC;gBACvC,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC;gBAC/B,OAAO,EAAE,OAAO,CAAC,IAAI;aACrB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvD,CAAC;;AAGF,SAAS,WAAW,CAAC,KAAiB,EAAE,EAAgC;IACvE,OAAO,0BAA0B,CAAU,KAAK,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE;QACvE,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;YAAC,OAAO,IAAI,CAAC;QAAC,CAAC;QACxC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;IACnB,CAAC,CAAC,CAAC;AACJ,CAAC","file":"placeholderTextContribution.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 { h } from '../../../../base/browser/dom.js';\nimport { structuralEquals } from '../../../../base/common/equals.js';\nimport { Disposable } from '../../../../base/common/lifecycle.js';\nimport { autorun, constObservable, DebugOwner, derivedObservableWithCache, derivedOpts, derived, IObservable, IReader } from '../../../../base/common/observable.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../browser/observableCodeEditor.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { IEditorContribution } from '../../../common/editorCommon.js';\n\n/**\n * Use the editor option to set the placeholder text.\n*/\nexport class PlaceholderTextContribution extends Disposable implements IEditorContribution {\n\n\tpublic static readonly ID = 'editor.contrib.placeholderText';\n\tprivate readonly _editorObs;\n\n\tprivate readonly _placeholderText;\n\n\tprivate readonly _state;\n\n\tprivate readonly _shouldViewBeAlive;\n\n\tprivate readonly _view;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t) {\n\t\tsuper();\n\t\tthis._editorObs = observableCodeEditor(this._editor);\n\t\tthis._placeholderText = this._editorObs.getOption(EditorOption.placeholder);\n\t\tthis._state = derivedOpts<{ placeholder: string } | undefined>({ owner: this, equalsFn: structuralEquals }, reader => {\n\t\t\tconst p = this._placeholderText.read(reader);\n\t\t\tif (!p) { return undefined; }\n\t\t\tif (!this._editorObs.valueIsEmpty.read(reader)) { return undefined; }\n\t\t\treturn { placeholder: p };\n\t\t});\n\t\tthis._shouldViewBeAlive = isOrWasTrue(this, reader => this._state.read(reader)?.placeholder !== undefined);\n\t\tthis._view = derived((reader) => {\n\t\t\tif (!this._shouldViewBeAlive.read(reader)) { return; }\n\n\t\t\tconst element = h('div.editorPlaceholder');\n\n\t\t\treader.store.add(autorun(reader => {\n\t\t\t\tconst data = this._state.read(reader);\n\t\t\t\tconst shouldBeVisibile = data?.placeholder !== undefined;\n\t\t\t\telement.root.style.display = shouldBeVisibile ? 'block' : 'none';\n\t\t\t\telement.root.innerText = data?.placeholder ?? '';\n\t\t\t}));\n\t\t\treader.store.add(autorun(reader => {\n\t\t\t\tconst info = this._editorObs.layoutInfo.read(reader);\n\t\t\t\telement.root.style.left = `${info.contentLeft}px`;\n\t\t\t\telement.root.style.width = (info.contentWidth - info.verticalScrollbarWidth) + 'px';\n\t\t\t\telement.root.style.top = `${this._editor.getTopForLineNumber(0)}px`;\n\t\t\t}));\n\t\t\treader.store.add(autorun(reader => {\n\t\t\t\telement.root.style.fontFamily = this._editorObs.getOption(EditorOption.fontFamily).read(reader);\n\t\t\t\telement.root.style.fontSize = this._editorObs.getOption(EditorOption.fontSize).read(reader) + 'px';\n\t\t\t\telement.root.style.lineHeight = this._editorObs.getOption(EditorOption.lineHeight).read(reader) + 'px';\n\t\t\t}));\n\t\t\treader.store.add(this._editorObs.createOverlayWidget({\n\t\t\t\tallowEditorOverflow: false,\n\t\t\t\tminContentWidthInPx: constObservable(0),\n\t\t\t\tposition: constObservable(null),\n\t\t\t\tdomNode: element.root,\n\t\t\t}));\n\t\t});\n\t\tthis._view.recomputeInitiallyAndOnChange(this._store);\n\t}\n}\n\nfunction isOrWasTrue(owner: DebugOwner, fn: (reader: IReader) => boolean): IObservable<boolean> {\n\treturn derivedObservableWithCache<boolean>(owner, (reader, lastValue) => {\n\t\tif (lastValue === true) { return true; }\n\t\treturn fn(reader);\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 { h } from '../../../../base/browser/dom.js';\nimport { structuralEquals } from '../../../../base/common/equals.js';\nimport { Disposable } from '../../../../base/common/lifecycle.js';\nimport { autorun, constObservable, DebugOwner, derivedObservableWithCache, derivedOpts, derived, IObservable, IReader } from '../../../../base/common/observable.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../browser/observableCodeEditor.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { IEditorContribution } from '../../../common/editorCommon.js';\n\n/**\n * Use the editor option to set the placeholder text.\n*/\nexport class PlaceholderTextContribution extends Disposable implements IEditorContribution {\n\n\tpublic static readonly ID = 'editor.contrib.placeholderText';\n\tprivate readonly _editorObs;\n\n\tprivate readonly _placeholderText;\n\n\tprivate readonly _state;\n\n\tprivate readonly _shouldViewBeAlive;\n\n\tprivate readonly _view;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t) {\n\t\tsuper();\n\t\tthis._editorObs = observableCodeEditor(this._editor);\n\t\tthis._placeholderText = this._editorObs.getOption(EditorOption.placeholder);\n\t\tthis._state = derivedOpts<{ placeholder: string } | undefined>({ owner: this, equalsFn: structuralEquals }, reader => {\n\t\t\tconst p = this._placeholderText.read(reader);\n\t\t\tif (!p) { return undefined; }\n\t\t\tif (!this._editorObs.valueIsEmpty.read(reader)) { return undefined; }\n\t\t\treturn { placeholder: p };\n\t\t});\n\t\tthis._shouldViewBeAlive = isOrWasTrue(this, reader => this._state.read(reader)?.placeholder !== undefined);\n\t\tthis._view = derived((reader) => {\n\t\t\tif (!this._shouldViewBeAlive.read(reader)) { return; }\n\n\t\t\tconst element = h('div.editorPlaceholder');\n\n\t\t\treader.store.add(autorun(reader => {\n\t\t\t\tconst data = this._state.read(reader);\n\t\t\t\tconst shouldBeVisibile = data?.placeholder !== undefined;\n\t\t\t\telement.root.style.display = shouldBeVisibile ? 'block' : 'none';\n\t\t\t\telement.root.innerText = data?.placeholder ?? '';\n\t\t\t}));\n\t\t\treader.store.add(autorun(reader => {\n\t\t\t\tconst info = this._editorObs.layoutInfo.read(reader);\n\t\t\t\telement.root.style.left = `${info.contentLeft}px`;\n\t\t\t\telement.root.style.width = (info.contentWidth - info.verticalScrollbarWidth) + 'px';\n\t\t\t\telement.root.style.top = `${this._editor.getTopForLineNumber(0)}px`;\n\t\t\t}));\n\t\t\treader.store.add(autorun(reader => {\n\t\t\t\telement.root.style.fontFamily = this._editorObs.getOption(EditorOption.fontFamily).read(reader);\n\t\t\t\telement.root.style.fontSize = this._editorObs.getOption(EditorOption.fontSize).read(reader) + 'px';\n\t\t\t\telement.root.style.lineHeight = this._editorObs.getOption(EditorOption.lineHeight).read(reader) + 'px';\n\t\t\t}));\n\t\t\treader.store.add(this._editorObs.createOverlayWidget({\n\t\t\t\tallowEditorOverflow: false,\n\t\t\t\tminContentWidthInPx: constObservable(0),\n\t\t\t\tposition: constObservable(null),\n\t\t\t\tdomNode: element.root,\n\t\t\t}));\n\t\t});\n\t\tthis._view.recomputeInitiallyAndOnChange(this._store);\n\t}\n}\n\nfunction isOrWasTrue(owner: DebugOwner, fn: (reader: IReader) => boolean): IObservable<boolean> {\n\treturn derivedObservableWithCache<boolean>(owner, (reader, lastValue) => {\n\t\tif (lastValue === true) { return true; }\n\t\treturn fn(reader);\n\t});\n}\n"]}
|
|
@@ -12,7 +12,7 @@ export class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigatio
|
|
|
12
12
|
super({ canAcceptInBackground: true });
|
|
13
13
|
}
|
|
14
14
|
provideWithoutTextEditor(picker) {
|
|
15
|
-
const label = localize(
|
|
15
|
+
const label = localize(1323, "Open a text editor first to go to a line.");
|
|
16
16
|
picker.items = [{ label }];
|
|
17
17
|
picker.ariaLabel = label;
|
|
18
18
|
return Disposable.None;
|
|
@@ -91,17 +91,17 @@ export class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigatio
|
|
|
91
91
|
// Location valid: indicate this as picker label
|
|
92
92
|
if (this.isValidLineNumber(editor, lineNumber)) {
|
|
93
93
|
if (this.isValidColumn(editor, lineNumber, column)) {
|
|
94
|
-
return localize(
|
|
94
|
+
return localize(1324, "Go to line {0} and character {1}.", lineNumber, column);
|
|
95
95
|
}
|
|
96
|
-
return localize(
|
|
96
|
+
return localize(1325, "Go to line {0}.", lineNumber);
|
|
97
97
|
}
|
|
98
98
|
// Location invalid: show generic label
|
|
99
99
|
const position = editor.getPosition() || { lineNumber: 1, column: 1 };
|
|
100
100
|
const lineCount = this.lineCount(editor);
|
|
101
101
|
if (lineCount > 1) {
|
|
102
|
-
return localize(
|
|
102
|
+
return localize(1326, "Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.", position.lineNumber, position.column, lineCount);
|
|
103
103
|
}
|
|
104
|
-
return localize(
|
|
104
|
+
return localize(1327, "Current Line: {0}, Character: {1}. Type a line number to navigate to.", position.lineNumber, position.column);
|
|
105
105
|
}
|
|
106
106
|
isValidLineNumber(editor, lineNumber) {
|
|
107
107
|
if (!lineNumber || typeof lineNumber !== 'number') {
|