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
|
@@ -105,8 +105,8 @@ export class ViewLayout extends Disposable {
|
|
|
105
105
|
super();
|
|
106
106
|
this._configuration = configuration;
|
|
107
107
|
const options = this._configuration.options;
|
|
108
|
-
const layoutInfo = options.get(
|
|
109
|
-
const padding = options.get(
|
|
108
|
+
const layoutInfo = options.get(165 /* EditorOption.layoutInfo */);
|
|
109
|
+
const padding = options.get(96 /* EditorOption.padding */);
|
|
110
110
|
this._linesLayout = new LinesLayout(lineCount, options.get(75 /* EditorOption.lineHeight */), padding.top, padding.bottom, customLineHeightData);
|
|
111
111
|
this._maxLineWidth = 0;
|
|
112
112
|
this._overlayWidgetsMinWidth = 0;
|
|
@@ -127,7 +127,7 @@ export class ViewLayout extends Disposable {
|
|
|
127
127
|
this._updateHeight();
|
|
128
128
|
}
|
|
129
129
|
_configureSmoothScrollDuration() {
|
|
130
|
-
this._scrollable.setSmoothScrollDuration(this._configuration.options.get(
|
|
130
|
+
this._scrollable.setSmoothScrollDuration(this._configuration.options.get(130 /* EditorOption.smoothScrolling */) ? SMOOTH_SCROLLING_TIME : 0);
|
|
131
131
|
}
|
|
132
132
|
// ---- begin view event handlers
|
|
133
133
|
onConfigurationChanged(e) {
|
|
@@ -135,12 +135,12 @@ export class ViewLayout extends Disposable {
|
|
|
135
135
|
if (e.hasChanged(75 /* EditorOption.lineHeight */)) {
|
|
136
136
|
this._linesLayout.setDefaultLineHeight(options.get(75 /* EditorOption.lineHeight */));
|
|
137
137
|
}
|
|
138
|
-
if (e.hasChanged(
|
|
139
|
-
const padding = options.get(
|
|
138
|
+
if (e.hasChanged(96 /* EditorOption.padding */)) {
|
|
139
|
+
const padding = options.get(96 /* EditorOption.padding */);
|
|
140
140
|
this._linesLayout.setPadding(padding.top, padding.bottom);
|
|
141
141
|
}
|
|
142
|
-
if (e.hasChanged(
|
|
143
|
-
const layoutInfo = options.get(
|
|
142
|
+
if (e.hasChanged(165 /* EditorOption.layoutInfo */)) {
|
|
143
|
+
const layoutInfo = options.get(165 /* EditorOption.layoutInfo */);
|
|
144
144
|
const width = layoutInfo.contentWidth;
|
|
145
145
|
const height = layoutInfo.height;
|
|
146
146
|
const scrollDimensions = this._scrollable.getScrollDimensions();
|
|
@@ -150,7 +150,7 @@ export class ViewLayout extends Disposable {
|
|
|
150
150
|
else {
|
|
151
151
|
this._updateHeight();
|
|
152
152
|
}
|
|
153
|
-
if (e.hasChanged(
|
|
153
|
+
if (e.hasChanged(130 /* EditorOption.smoothScrolling */)) {
|
|
154
154
|
this._configureSmoothScrollDuration();
|
|
155
155
|
}
|
|
156
156
|
}
|
|
@@ -166,7 +166,7 @@ export class ViewLayout extends Disposable {
|
|
|
166
166
|
// ---- end view event handlers
|
|
167
167
|
_getHorizontalScrollbarHeight(width, scrollWidth) {
|
|
168
168
|
const options = this._configuration.options;
|
|
169
|
-
const scrollbar = options.get(
|
|
169
|
+
const scrollbar = options.get(117 /* EditorOption.scrollbar */);
|
|
170
170
|
if (scrollbar.horizontal === 2 /* ScrollbarVisibility.Hidden */) {
|
|
171
171
|
// horizontal scrollbar not visible
|
|
172
172
|
return 0;
|
|
@@ -180,10 +180,10 @@ export class ViewLayout extends Disposable {
|
|
|
180
180
|
_getContentHeight(width, height, contentWidth) {
|
|
181
181
|
const options = this._configuration.options;
|
|
182
182
|
let result = this._linesLayout.getLinesTotalHeight();
|
|
183
|
-
if (options.get(
|
|
184
|
-
result += Math.max(0, height - options.get(75 /* EditorOption.lineHeight */) - options.get(
|
|
183
|
+
if (options.get(119 /* EditorOption.scrollBeyondLastLine */)) {
|
|
184
|
+
result += Math.max(0, height - options.get(75 /* EditorOption.lineHeight */) - options.get(96 /* EditorOption.padding */).bottom);
|
|
185
185
|
}
|
|
186
|
-
else if (!options.get(
|
|
186
|
+
else if (!options.get(117 /* EditorOption.scrollbar */).ignoreHorizontalScrollbarInContentHeight) {
|
|
187
187
|
result += this._getHorizontalScrollbarHeight(width, contentWidth);
|
|
188
188
|
}
|
|
189
189
|
return result;
|
|
@@ -209,9 +209,9 @@ export class ViewLayout extends Disposable {
|
|
|
209
209
|
_computeContentWidth() {
|
|
210
210
|
const options = this._configuration.options;
|
|
211
211
|
const maxLineWidth = this._maxLineWidth;
|
|
212
|
-
const wrappingInfo = options.get(
|
|
212
|
+
const wrappingInfo = options.get(166 /* EditorOption.wrappingInfo */);
|
|
213
213
|
const fontInfo = options.get(59 /* EditorOption.fontInfo */);
|
|
214
|
-
const layoutInfo = options.get(
|
|
214
|
+
const layoutInfo = options.get(165 /* EditorOption.layoutInfo */);
|
|
215
215
|
if (wrappingInfo.isViewportWrapping) {
|
|
216
216
|
const minimap = options.get(81 /* EditorOption.minimap */);
|
|
217
217
|
if (maxLineWidth > layoutInfo.contentWidth + fontInfo.typicalHalfwidthCharacterWidth) {
|
|
@@ -224,7 +224,7 @@ export class ViewLayout extends Disposable {
|
|
|
224
224
|
return maxLineWidth;
|
|
225
225
|
}
|
|
226
226
|
else {
|
|
227
|
-
const extraHorizontalSpace = options.get(
|
|
227
|
+
const extraHorizontalSpace = options.get(118 /* EditorOption.scrollBeyondLastColumn */) * fontInfo.typicalHalfwidthCharacterWidth;
|
|
228
228
|
const whitespaceMinWidth = this._linesLayout.getWhitespaceMinWidth();
|
|
229
229
|
return Math.max(maxLineWidth + extraHorizontalSpace + layoutInfo.verticalScrollbarWidth, whitespaceMinWidth, this._overlayWidgetsMinWidth);
|
|
230
230
|
}
|
|
@@ -886,7 +886,7 @@ function _renderLine(input, sb) {
|
|
|
886
886
|
}
|
|
887
887
|
if (isOverflowing) {
|
|
888
888
|
sb.appendString('<span class="mtkoverflow">');
|
|
889
|
-
sb.appendString(nls.localize(
|
|
889
|
+
sb.appendString(nls.localize(790, "Show more ({0})", renderOverflowingCharCount(overflowingCharCount)));
|
|
890
890
|
sb.appendString('</span>');
|
|
891
891
|
}
|
|
892
892
|
sb.appendString('</span>');
|
|
@@ -897,7 +897,7 @@ function to4CharHex(n) {
|
|
|
897
897
|
}
|
|
898
898
|
function renderOverflowingCharCount(n) {
|
|
899
899
|
if (n < 1024) {
|
|
900
|
-
return nls.localize(
|
|
900
|
+
return nls.localize(791, "{0} chars", n);
|
|
901
901
|
}
|
|
902
902
|
if (n < 1024 * 1024) {
|
|
903
903
|
return `${(n / 1024).toFixed(1)} KB`;
|
|
@@ -8,7 +8,7 @@ import { LineInjectedText } from '../textModelEvents.js';
|
|
|
8
8
|
import { ModelLineProjectionData } from '../modelLineProjectionData.js';
|
|
9
9
|
export class MonospaceLineBreaksComputerFactory {
|
|
10
10
|
static create(options) {
|
|
11
|
-
return new MonospaceLineBreaksComputerFactory(options.get(
|
|
11
|
+
return new MonospaceLineBreaksComputerFactory(options.get(151 /* EditorOption.wordWrapBreakBeforeCharacters */), options.get(150 /* EditorOption.wordWrapBreakAfterCharacters */));
|
|
12
12
|
}
|
|
13
13
|
constructor(breakBeforeChars, breakAfterChars) {
|
|
14
14
|
this.classifier = new WrappingCharacterClassifier(breakBeforeChars, breakAfterChars);
|
|
@@ -52,11 +52,11 @@ export class ViewModel extends Disposable {
|
|
|
52
52
|
else {
|
|
53
53
|
const options = this._configuration.options;
|
|
54
54
|
const fontInfo = options.get(59 /* EditorOption.fontInfo */);
|
|
55
|
-
const wrappingStrategy = options.get(
|
|
56
|
-
const wrappingInfo = options.get(
|
|
57
|
-
const wrappingIndent = options.get(
|
|
58
|
-
const wordBreak = options.get(
|
|
59
|
-
const wrapOnEscapedLineFeeds = options.get(
|
|
55
|
+
const wrappingStrategy = options.get(156 /* EditorOption.wrappingStrategy */);
|
|
56
|
+
const wrappingInfo = options.get(166 /* EditorOption.wrappingInfo */);
|
|
57
|
+
const wrappingIndent = options.get(155 /* EditorOption.wrappingIndent */);
|
|
58
|
+
const wordBreak = options.get(146 /* EditorOption.wordBreak */);
|
|
59
|
+
const wrapOnEscapedLineFeeds = options.get(160 /* EditorOption.wrapOnEscapedLineFeeds */);
|
|
60
60
|
this._lines = new ViewModelLinesFromProjectedModel(this._editorId, this.model, domLineBreaksComputerFactory, monospaceLineBreaksComputerFactory, fontInfo, this.model.getOptions().tabSize, wrappingStrategy, wrappingInfo.wrappingColumn, wrappingIndent, wordBreak, wrapOnEscapedLineFeeds);
|
|
61
61
|
}
|
|
62
62
|
this.coordinatesConverter = this._lines.createCoordinatesConverter();
|
|
@@ -176,10 +176,10 @@ export class ViewModel extends Disposable {
|
|
|
176
176
|
const stableViewport = this._captureStableViewport();
|
|
177
177
|
const options = this._configuration.options;
|
|
178
178
|
const fontInfo = options.get(59 /* EditorOption.fontInfo */);
|
|
179
|
-
const wrappingStrategy = options.get(
|
|
180
|
-
const wrappingInfo = options.get(
|
|
181
|
-
const wrappingIndent = options.get(
|
|
182
|
-
const wordBreak = options.get(
|
|
179
|
+
const wrappingStrategy = options.get(156 /* EditorOption.wrappingStrategy */);
|
|
180
|
+
const wrappingInfo = options.get(166 /* EditorOption.wrappingInfo */);
|
|
181
|
+
const wrappingIndent = options.get(155 /* EditorOption.wrappingIndent */);
|
|
182
|
+
const wordBreak = options.get(146 /* EditorOption.wordBreak */);
|
|
183
183
|
if (this._lines.setWrappingSettings(fontInfo, wrappingStrategy, wrappingInfo.wrappingColumn, wrappingIndent, wordBreak)) {
|
|
184
184
|
eventsCollector.emitViewEvent(new viewEvents.ViewFlushedEvent());
|
|
185
185
|
eventsCollector.emitViewEvent(new viewEvents.ViewLineMappingChangedEvent());
|
|
@@ -189,12 +189,12 @@ export class ViewModel extends Disposable {
|
|
|
189
189
|
this.viewLayout.onFlushed(this.getLineCount(), this._getCustomLineHeights());
|
|
190
190
|
this._updateConfigurationViewLineCount.schedule();
|
|
191
191
|
}
|
|
192
|
-
if (e.hasChanged(
|
|
192
|
+
if (e.hasChanged(104 /* EditorOption.readOnly */)) {
|
|
193
193
|
// Must read again all decorations due to readOnly filtering
|
|
194
194
|
this._decorations.reset();
|
|
195
195
|
eventsCollector.emitViewEvent(new viewEvents.ViewDecorationsChangedEvent(null));
|
|
196
196
|
}
|
|
197
|
-
if (e.hasChanged(
|
|
197
|
+
if (e.hasChanged(112 /* EditorOption.renderValidationDecorations */)) {
|
|
198
198
|
this._decorations.reset();
|
|
199
199
|
eventsCollector.emitViewEvent(new viewEvents.ViewDecorationsChangedEvent(null));
|
|
200
200
|
}
|
|
@@ -356,7 +356,7 @@ export class ViewModel extends Disposable {
|
|
|
356
356
|
}
|
|
357
357
|
}));
|
|
358
358
|
}
|
|
359
|
-
const allowVariableFonts = this._configuration.options.get(
|
|
359
|
+
const allowVariableFonts = this._configuration.options.get(172 /* EditorOption.effectiveAllowVariableFonts */);
|
|
360
360
|
if (allowVariableFonts) {
|
|
361
361
|
this._register(this.model.onDidChangeFont((e) => {
|
|
362
362
|
const filteredChanges = e.changes.filter((change) => change.ownerId === this._editorId || change.ownerId === 0);
|
|
@@ -420,7 +420,7 @@ export class ViewModel extends Disposable {
|
|
|
420
420
|
}));
|
|
421
421
|
}
|
|
422
422
|
getFontSizeAtPosition(position) {
|
|
423
|
-
const allowVariableFonts = this._configuration.options.get(
|
|
423
|
+
const allowVariableFonts = this._configuration.options.get(172 /* EditorOption.effectiveAllowVariableFonts */);
|
|
424
424
|
if (!allowVariableFonts) {
|
|
425
425
|
return null;
|
|
426
426
|
}
|
|
@@ -475,7 +475,7 @@ export class ViewModel extends Disposable {
|
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
477
|
getVisibleRangesPlusViewportAboveBelow() {
|
|
478
|
-
const layoutInfo = this._configuration.options.get(
|
|
478
|
+
const layoutInfo = this._configuration.options.get(165 /* EditorOption.layoutInfo */);
|
|
479
479
|
const lineHeight = this._configuration.options.get(75 /* EditorOption.lineHeight */);
|
|
480
480
|
const linesAround = Math.max(20, Math.round(layoutInfo.height / lineHeight));
|
|
481
481
|
const partialData = this.viewLayout.getLinesViewportData();
|
|
@@ -43,12 +43,12 @@ let SelectionAnchorController = class SelectionAnchorController {
|
|
|
43
43
|
this.decorationId = accessor.addDecoration(Selection.fromPositions(position, position), {
|
|
44
44
|
description: 'selection-anchor',
|
|
45
45
|
stickiness: 1 /* TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges */,
|
|
46
|
-
hoverMessage: new MarkdownString().appendText(localize(
|
|
46
|
+
hoverMessage: new MarkdownString().appendText(localize(792, "Selection Anchor")),
|
|
47
47
|
className: 'selection-anchor'
|
|
48
48
|
});
|
|
49
49
|
});
|
|
50
50
|
this.selectionAnchorSetContextKey.set(!!this.decorationId);
|
|
51
|
-
alert(localize(
|
|
51
|
+
alert(localize(793, "Anchor set at {0}:{1}", position.lineNumber, position.column));
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
goToSelectionAnchor() {
|
|
@@ -91,7 +91,7 @@ class SetSelectionAnchor extends EditorAction {
|
|
|
91
91
|
constructor() {
|
|
92
92
|
super({
|
|
93
93
|
id: 'editor.action.setSelectionAnchor',
|
|
94
|
-
label: localize2(
|
|
94
|
+
label: localize2(794, "Set Selection Anchor"),
|
|
95
95
|
precondition: undefined,
|
|
96
96
|
kbOpts: {
|
|
97
97
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -108,7 +108,7 @@ class GoToSelectionAnchor extends EditorAction {
|
|
|
108
108
|
constructor() {
|
|
109
109
|
super({
|
|
110
110
|
id: 'editor.action.goToSelectionAnchor',
|
|
111
|
-
label: localize2(
|
|
111
|
+
label: localize2(795, "Go to Selection Anchor"),
|
|
112
112
|
precondition: SelectionAnchorSet,
|
|
113
113
|
});
|
|
114
114
|
}
|
|
@@ -120,7 +120,7 @@ class SelectFromAnchorToCursor extends EditorAction {
|
|
|
120
120
|
constructor() {
|
|
121
121
|
super({
|
|
122
122
|
id: 'editor.action.selectFromAnchorToCursor',
|
|
123
|
-
label: localize2(
|
|
123
|
+
label: localize2(796, "Select from Anchor to Cursor"),
|
|
124
124
|
precondition: SelectionAnchorSet,
|
|
125
125
|
kbOpts: {
|
|
126
126
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -137,7 +137,7 @@ class CancelSelectionAnchor extends EditorAction {
|
|
|
137
137
|
constructor() {
|
|
138
138
|
super({
|
|
139
139
|
id: 'editor.action.cancelSelectionAnchor',
|
|
140
|
-
label: localize2(
|
|
140
|
+
label: localize2(797, "Cancel Selection Anchor"),
|
|
141
141
|
precondition: SelectionAnchorSet,
|
|
142
142
|
kbOpts: {
|
|
143
143
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -16,12 +16,12 @@ import * as nls from '../../../../nls.js';
|
|
|
16
16
|
import { MenuId, MenuRegistry } from '../../../../platform/actions/common/actions.js';
|
|
17
17
|
import { registerColor } from '../../../../platform/theme/common/colorRegistry.js';
|
|
18
18
|
import { themeColorFromId } from '../../../../platform/theme/common/themeService.js';
|
|
19
|
-
const overviewRulerBracketMatchForeground = registerColor('editorOverviewRuler.bracketMatchForeground', '#A0A0A0', nls.localize(
|
|
19
|
+
const overviewRulerBracketMatchForeground = registerColor('editorOverviewRuler.bracketMatchForeground', '#A0A0A0', nls.localize(798, 'Overview ruler marker color for matching brackets.'));
|
|
20
20
|
class JumpToBracketAction extends EditorAction {
|
|
21
21
|
constructor() {
|
|
22
22
|
super({
|
|
23
23
|
id: 'editor.action.jumpToBracket',
|
|
24
|
-
label: nls.localize2(
|
|
24
|
+
label: nls.localize2(800, "Go to Bracket"),
|
|
25
25
|
precondition: undefined,
|
|
26
26
|
kbOpts: {
|
|
27
27
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -38,10 +38,10 @@ class SelectToBracketAction extends EditorAction {
|
|
|
38
38
|
constructor() {
|
|
39
39
|
super({
|
|
40
40
|
id: 'editor.action.selectToBracket',
|
|
41
|
-
label: nls.localize2(
|
|
41
|
+
label: nls.localize2(801, "Select to Bracket"),
|
|
42
42
|
precondition: undefined,
|
|
43
43
|
metadata: {
|
|
44
|
-
description: nls.localize2(
|
|
44
|
+
description: nls.localize2(802, "Select the text inside and including the brackets or curly braces"),
|
|
45
45
|
args: [{
|
|
46
46
|
name: 'args',
|
|
47
47
|
schema: {
|
|
@@ -69,7 +69,7 @@ class RemoveBracketsAction extends EditorAction {
|
|
|
69
69
|
constructor() {
|
|
70
70
|
super({
|
|
71
71
|
id: 'editor.action.removeBrackets',
|
|
72
|
-
label: nls.localize2(
|
|
72
|
+
label: nls.localize2(803, "Remove Brackets"),
|
|
73
73
|
precondition: undefined,
|
|
74
74
|
kbOpts: {
|
|
75
75
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -339,7 +339,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
|
|
|
339
339
|
group: '5_infile_nav',
|
|
340
340
|
command: {
|
|
341
341
|
id: 'editor.action.jumpToBracket',
|
|
342
|
-
title: nls.localize(
|
|
342
|
+
title: nls.localize(799, "Go to &&Bracket")
|
|
343
343
|
},
|
|
344
344
|
order: 2
|
|
345
345
|
});
|
|
@@ -29,7 +29,7 @@ class MoveCaretLeftAction extends MoveCaretAction {
|
|
|
29
29
|
constructor() {
|
|
30
30
|
super(true, {
|
|
31
31
|
id: 'editor.action.moveCarretLeftAction',
|
|
32
|
-
label: nls.localize2(
|
|
32
|
+
label: nls.localize2(804, "Move Selected Text Left"),
|
|
33
33
|
precondition: EditorContextKeys.writable
|
|
34
34
|
});
|
|
35
35
|
}
|
|
@@ -38,7 +38,7 @@ class MoveCaretRightAction extends MoveCaretAction {
|
|
|
38
38
|
constructor() {
|
|
39
39
|
super(false, {
|
|
40
40
|
id: 'editor.action.moveCarretRightAction',
|
|
41
|
-
label: nls.localize2(
|
|
41
|
+
label: nls.localize2(805, "Move Selected Text Right"),
|
|
42
42
|
precondition: EditorContextKeys.writable
|
|
43
43
|
});
|
|
44
44
|
}
|
|
@@ -12,7 +12,7 @@ class TransposeLettersAction extends EditorAction {
|
|
|
12
12
|
constructor() {
|
|
13
13
|
super({
|
|
14
14
|
id: 'editor.action.transposeLetters',
|
|
15
|
-
label: nls.localize2(
|
|
15
|
+
label: nls.localize2(806, "Transpose Letters"),
|
|
16
16
|
precondition: EditorContextKeys.writable,
|
|
17
17
|
kbOpts: {
|
|
18
18
|
kbExpr: EditorContextKeys.textInputFocus,
|
|
@@ -44,23 +44,23 @@ export const CutAction = supportsCut ? registerCommand(new MultiCommand({
|
|
|
44
44
|
menuOpts: [{
|
|
45
45
|
menuId: MenuId.MenubarEditMenu,
|
|
46
46
|
group: '2_ccp',
|
|
47
|
-
title: nls.localize(
|
|
47
|
+
title: nls.localize(807, "Cu&&t"),
|
|
48
48
|
order: 1
|
|
49
49
|
}, {
|
|
50
50
|
menuId: MenuId.EditorContext,
|
|
51
51
|
group: CLIPBOARD_CONTEXT_MENU_GROUP,
|
|
52
|
-
title: nls.localize(
|
|
52
|
+
title: nls.localize(808, "Cut"),
|
|
53
53
|
when: EditorContextKeys.writable,
|
|
54
54
|
order: 1,
|
|
55
55
|
}, {
|
|
56
56
|
menuId: MenuId.CommandPalette,
|
|
57
57
|
group: '',
|
|
58
|
-
title: nls.localize(
|
|
58
|
+
title: nls.localize(809, "Cut"),
|
|
59
59
|
order: 1
|
|
60
60
|
}, {
|
|
61
61
|
menuId: MenuId.SimpleEditorContext,
|
|
62
62
|
group: CLIPBOARD_CONTEXT_MENU_GROUP,
|
|
63
|
-
title: nls.localize(
|
|
63
|
+
title: nls.localize(810, "Cut"),
|
|
64
64
|
when: EditorContextKeys.writable,
|
|
65
65
|
order: 1,
|
|
66
66
|
}]
|
|
@@ -79,29 +79,29 @@ export const CopyAction = supportsCopy ? registerCommand(new MultiCommand({
|
|
|
79
79
|
menuOpts: [{
|
|
80
80
|
menuId: MenuId.MenubarEditMenu,
|
|
81
81
|
group: '2_ccp',
|
|
82
|
-
title: nls.localize(
|
|
82
|
+
title: nls.localize(811, "&&Copy"),
|
|
83
83
|
order: 2
|
|
84
84
|
}, {
|
|
85
85
|
menuId: MenuId.EditorContext,
|
|
86
86
|
group: CLIPBOARD_CONTEXT_MENU_GROUP,
|
|
87
|
-
title: nls.localize(
|
|
87
|
+
title: nls.localize(812, "Copy"),
|
|
88
88
|
order: 2,
|
|
89
89
|
}, {
|
|
90
90
|
menuId: MenuId.CommandPalette,
|
|
91
91
|
group: '',
|
|
92
|
-
title: nls.localize(
|
|
92
|
+
title: nls.localize(813, "Copy"),
|
|
93
93
|
order: 1
|
|
94
94
|
}, {
|
|
95
95
|
menuId: MenuId.SimpleEditorContext,
|
|
96
96
|
group: CLIPBOARD_CONTEXT_MENU_GROUP,
|
|
97
|
-
title: nls.localize(
|
|
97
|
+
title: nls.localize(814, "Copy"),
|
|
98
98
|
order: 2,
|
|
99
99
|
}]
|
|
100
100
|
})) : undefined;
|
|
101
|
-
MenuRegistry.appendMenuItem(MenuId.MenubarEditMenu, { submenu: MenuId.MenubarCopy, title: nls.localize2(
|
|
102
|
-
MenuRegistry.appendMenuItem(MenuId.EditorContext, { submenu: MenuId.EditorContextCopy, title: nls.localize2(
|
|
103
|
-
MenuRegistry.appendMenuItem(MenuId.EditorContext, { submenu: MenuId.EditorContextShare, title: nls.localize2(
|
|
104
|
-
MenuRegistry.appendMenuItem(MenuId.ExplorerContext, { submenu: MenuId.ExplorerContextShare, title: nls.localize2(
|
|
101
|
+
MenuRegistry.appendMenuItem(MenuId.MenubarEditMenu, { submenu: MenuId.MenubarCopy, title: nls.localize2(819, "Copy As"), group: '2_ccp', order: 3 });
|
|
102
|
+
MenuRegistry.appendMenuItem(MenuId.EditorContext, { submenu: MenuId.EditorContextCopy, title: nls.localize2(820, "Copy As"), group: CLIPBOARD_CONTEXT_MENU_GROUP, order: 3 });
|
|
103
|
+
MenuRegistry.appendMenuItem(MenuId.EditorContext, { submenu: MenuId.EditorContextShare, title: nls.localize2(821, "Share"), group: '11_share', order: -1, when: ContextKeyExpr.and(ContextKeyExpr.notEquals('resourceScheme', 'output'), EditorContextKeys.editorTextFocus) });
|
|
104
|
+
MenuRegistry.appendMenuItem(MenuId.ExplorerContext, { submenu: MenuId.ExplorerContextShare, title: nls.localize2(822, "Share"), group: '11_share', order: -1 });
|
|
105
105
|
export const PasteAction = supportsPaste ? registerCommand(new MultiCommand({
|
|
106
106
|
id: 'editor.action.clipboardPasteAction',
|
|
107
107
|
precondition: undefined,
|
|
@@ -117,23 +117,23 @@ export const PasteAction = supportsPaste ? registerCommand(new MultiCommand({
|
|
|
117
117
|
menuOpts: [{
|
|
118
118
|
menuId: MenuId.MenubarEditMenu,
|
|
119
119
|
group: '2_ccp',
|
|
120
|
-
title: nls.localize(
|
|
120
|
+
title: nls.localize(815, "&&Paste"),
|
|
121
121
|
order: 4
|
|
122
122
|
}, {
|
|
123
123
|
menuId: MenuId.EditorContext,
|
|
124
124
|
group: CLIPBOARD_CONTEXT_MENU_GROUP,
|
|
125
|
-
title: nls.localize(
|
|
125
|
+
title: nls.localize(816, "Paste"),
|
|
126
126
|
when: EditorContextKeys.writable,
|
|
127
127
|
order: 4,
|
|
128
128
|
}, {
|
|
129
129
|
menuId: MenuId.CommandPalette,
|
|
130
130
|
group: '',
|
|
131
|
-
title: nls.localize(
|
|
131
|
+
title: nls.localize(817, "Paste"),
|
|
132
132
|
order: 1
|
|
133
133
|
}, {
|
|
134
134
|
menuId: MenuId.SimpleEditorContext,
|
|
135
135
|
group: CLIPBOARD_CONTEXT_MENU_GROUP,
|
|
136
|
-
title: nls.localize(
|
|
136
|
+
title: nls.localize(818, "Paste"),
|
|
137
137
|
when: EditorContextKeys.writable,
|
|
138
138
|
order: 4,
|
|
139
139
|
}]
|
|
@@ -142,7 +142,7 @@ class ExecCommandCopyWithSyntaxHighlightingAction extends EditorAction {
|
|
|
142
142
|
constructor() {
|
|
143
143
|
super({
|
|
144
144
|
id: 'editor.action.clipboardCopyWithSyntaxHighlightingAction',
|
|
145
|
-
label: nls.localize2(
|
|
145
|
+
label: nls.localize2(823, "Copy with Syntax Highlighting"),
|
|
146
146
|
precondition: undefined,
|
|
147
147
|
kbOpts: {
|
|
148
148
|
kbExpr: EditorContextKeys.textInputFocus,
|
|
@@ -187,7 +187,7 @@ function registerExecCommandImpl(target, browserCommand) {
|
|
|
187
187
|
return true;
|
|
188
188
|
}
|
|
189
189
|
// TODO this is very ugly. The entire copy/paste/cut system needs a complete refactoring.
|
|
190
|
-
if (focusedEditor.getOption(
|
|
190
|
+
if (focusedEditor.getOption(170 /* EditorOption.effectiveEditContext */) && browserCommand === 'cut') {
|
|
191
191
|
logCopyCommand(focusedEditor);
|
|
192
192
|
// execCommand(copy) works for edit context, but not execCommand(cut).
|
|
193
193
|
logService.trace('registerExecCommandImpl (before execCommand copy)');
|
|
@@ -216,7 +216,7 @@ function registerExecCommandImpl(target, browserCommand) {
|
|
|
216
216
|
});
|
|
217
217
|
}
|
|
218
218
|
function logCopyCommand(editor) {
|
|
219
|
-
const editContextEnabled = editor.getOption(
|
|
219
|
+
const editContextEnabled = editor.getOption(170 /* EditorOption.effectiveEditContext */);
|
|
220
220
|
if (editContextEnabled) {
|
|
221
221
|
const nativeEditContext = NativeEditContextRegistry.get(editor.getId());
|
|
222
222
|
if (nativeEditContext) {
|
|
@@ -239,7 +239,7 @@ if (PasteAction) {
|
|
|
239
239
|
const focusedEditor = codeEditorService.getFocusedCodeEditor();
|
|
240
240
|
if (focusedEditor && focusedEditor.hasModel() && focusedEditor.hasTextFocus()) {
|
|
241
241
|
// execCommand(paste) does not work with edit context
|
|
242
|
-
const editContextEnabled = focusedEditor.getOption(
|
|
242
|
+
const editContextEnabled = focusedEditor.getOption(170 /* EditorOption.effectiveEditContext */);
|
|
243
243
|
if (editContextEnabled) {
|
|
244
244
|
const nativeEditContext = NativeEditContextRegistry.get(focusedEditor.getId());
|
|
245
245
|
if (nativeEditContext) {
|
|
@@ -252,7 +252,7 @@ export async function applyCodeAction(accessor, item, codeActionReason, options,
|
|
|
252
252
|
const message = asMessage(err);
|
|
253
253
|
notificationService.error(typeof message === 'string'
|
|
254
254
|
? message
|
|
255
|
-
: nls.localize(
|
|
255
|
+
: nls.localize(824, "An unknown error occurred while applying the code action"));
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
// ensure the start sound and end sound do not overlap
|
|
@@ -21,23 +21,23 @@ const argsSchema = {
|
|
|
21
21
|
properties: {
|
|
22
22
|
'kind': {
|
|
23
23
|
type: 'string',
|
|
24
|
-
description: nls.localize(
|
|
24
|
+
description: nls.localize(825, "Kind of the code action to run."),
|
|
25
25
|
},
|
|
26
26
|
'apply': {
|
|
27
27
|
type: 'string',
|
|
28
|
-
description: nls.localize(
|
|
28
|
+
description: nls.localize(826, "Controls when the returned actions are applied."),
|
|
29
29
|
default: "ifSingle" /* CodeActionAutoApply.IfSingle */,
|
|
30
30
|
enum: ["first" /* CodeActionAutoApply.First */, "ifSingle" /* CodeActionAutoApply.IfSingle */, "never" /* CodeActionAutoApply.Never */],
|
|
31
31
|
enumDescriptions: [
|
|
32
|
-
nls.localize(
|
|
33
|
-
nls.localize(
|
|
34
|
-
nls.localize(
|
|
32
|
+
nls.localize(827, "Always apply the first returned code action."),
|
|
33
|
+
nls.localize(828, "Apply the first returned code action if it is the only one."),
|
|
34
|
+
nls.localize(829, "Do not apply the returned code actions."),
|
|
35
35
|
]
|
|
36
36
|
},
|
|
37
37
|
'preferred': {
|
|
38
38
|
type: 'boolean',
|
|
39
39
|
default: false,
|
|
40
|
-
description: nls.localize(
|
|
40
|
+
description: nls.localize(830, "Controls if only preferred code actions should be returned."),
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
};
|
|
@@ -51,7 +51,7 @@ export class QuickFixAction extends EditorAction {
|
|
|
51
51
|
constructor() {
|
|
52
52
|
super({
|
|
53
53
|
id: quickFixCommandId,
|
|
54
|
-
label: nls.localize2(
|
|
54
|
+
label: nls.localize2(847, "Quick Fix..."),
|
|
55
55
|
precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCodeActionsProvider),
|
|
56
56
|
kbOpts: {
|
|
57
57
|
kbExpr: EditorContextKeys.textInputFocus,
|
|
@@ -61,7 +61,7 @@ export class QuickFixAction extends EditorAction {
|
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
run(_accessor, editor) {
|
|
64
|
-
return triggerCodeActionsForEditorSelection(editor, nls.localize(
|
|
64
|
+
return triggerCodeActionsForEditorSelection(editor, nls.localize(831, "No code actions available"), undefined, undefined, CodeActionTriggerSource.QuickFix);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
export class CodeActionCommand extends EditorCommand {
|
|
@@ -82,11 +82,11 @@ export class CodeActionCommand extends EditorCommand {
|
|
|
82
82
|
});
|
|
83
83
|
return triggerCodeActionsForEditorSelection(editor, typeof userArgs?.kind === 'string'
|
|
84
84
|
? args.preferred
|
|
85
|
-
? nls.localize(
|
|
86
|
-
: nls.localize(
|
|
85
|
+
? nls.localize(832, "No preferred code actions for '{0}' available", userArgs.kind)
|
|
86
|
+
: nls.localize(833, "No code actions for '{0}' available", userArgs.kind)
|
|
87
87
|
: args.preferred
|
|
88
|
-
? nls.localize(
|
|
89
|
-
: nls.localize(
|
|
88
|
+
? nls.localize(834, "No preferred code actions available")
|
|
89
|
+
: nls.localize(835, "No code actions available"), {
|
|
90
90
|
include: args.kind,
|
|
91
91
|
includeSourceActions: true,
|
|
92
92
|
onlyIncludePreferredActions: args.preferred,
|
|
@@ -97,7 +97,7 @@ export class RefactorAction extends EditorAction {
|
|
|
97
97
|
constructor() {
|
|
98
98
|
super({
|
|
99
99
|
id: refactorCommandId,
|
|
100
|
-
label: nls.localize2(
|
|
100
|
+
label: nls.localize2(848, "Refactor..."),
|
|
101
101
|
precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCodeActionsProvider),
|
|
102
102
|
kbOpts: {
|
|
103
103
|
kbExpr: EditorContextKeys.textInputFocus,
|
|
@@ -125,11 +125,11 @@ export class RefactorAction extends EditorAction {
|
|
|
125
125
|
});
|
|
126
126
|
return triggerCodeActionsForEditorSelection(editor, typeof userArgs?.kind === 'string'
|
|
127
127
|
? args.preferred
|
|
128
|
-
? nls.localize(
|
|
129
|
-
: nls.localize(
|
|
128
|
+
? nls.localize(836, "No preferred refactorings for '{0}' available", userArgs.kind)
|
|
129
|
+
: nls.localize(837, "No refactorings for '{0}' available", userArgs.kind)
|
|
130
130
|
: args.preferred
|
|
131
|
-
? nls.localize(
|
|
132
|
-
: nls.localize(
|
|
131
|
+
? nls.localize(838, "No preferred refactorings available")
|
|
132
|
+
: nls.localize(839, "No refactorings available"), {
|
|
133
133
|
include: CodeActionKind.Refactor.contains(args.kind) ? args.kind : HierarchicalKind.None,
|
|
134
134
|
onlyIncludePreferredActions: args.preferred
|
|
135
135
|
}, args.apply, CodeActionTriggerSource.Refactor);
|
|
@@ -139,7 +139,7 @@ export class SourceAction extends EditorAction {
|
|
|
139
139
|
constructor() {
|
|
140
140
|
super({
|
|
141
141
|
id: sourceActionCommandId,
|
|
142
|
-
label: nls.localize2(
|
|
142
|
+
label: nls.localize2(849, "Source Action..."),
|
|
143
143
|
precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCodeActionsProvider),
|
|
144
144
|
contextMenuOpts: {
|
|
145
145
|
group: '1_modification',
|
|
@@ -159,11 +159,11 @@ export class SourceAction extends EditorAction {
|
|
|
159
159
|
});
|
|
160
160
|
return triggerCodeActionsForEditorSelection(editor, typeof userArgs?.kind === 'string'
|
|
161
161
|
? args.preferred
|
|
162
|
-
? nls.localize(
|
|
163
|
-
: nls.localize(
|
|
162
|
+
? nls.localize(840, "No preferred source actions for '{0}' available", userArgs.kind)
|
|
163
|
+
: nls.localize(841, "No source actions for '{0}' available", userArgs.kind)
|
|
164
164
|
: args.preferred
|
|
165
|
-
? nls.localize(
|
|
166
|
-
: nls.localize(
|
|
165
|
+
? nls.localize(842, "No preferred source actions available")
|
|
166
|
+
: nls.localize(843, "No source actions available"), {
|
|
167
167
|
include: CodeActionKind.Source.contains(args.kind) ? args.kind : HierarchicalKind.None,
|
|
168
168
|
includeSourceActions: true,
|
|
169
169
|
onlyIncludePreferredActions: args.preferred,
|
|
@@ -174,7 +174,7 @@ export class OrganizeImportsAction extends EditorAction {
|
|
|
174
174
|
constructor() {
|
|
175
175
|
super({
|
|
176
176
|
id: organizeImportsCommandId,
|
|
177
|
-
label: nls.localize2(
|
|
177
|
+
label: nls.localize2(850, "Organize Imports"),
|
|
178
178
|
precondition: ContextKeyExpr.and(EditorContextKeys.writable, contextKeyForSupportedActions(CodeActionKind.SourceOrganizeImports)),
|
|
179
179
|
kbOpts: {
|
|
180
180
|
kbExpr: EditorContextKeys.textInputFocus,
|
|
@@ -182,31 +182,31 @@ export class OrganizeImportsAction extends EditorAction {
|
|
|
182
182
|
weight: 100 /* KeybindingWeight.EditorContrib */
|
|
183
183
|
},
|
|
184
184
|
metadata: {
|
|
185
|
-
description: nls.localize2(
|
|
185
|
+
description: nls.localize2(851, "Organize imports in the current file. Also called 'Optimize Imports' by some tools")
|
|
186
186
|
}
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
189
|
run(_accessor, editor) {
|
|
190
|
-
return triggerCodeActionsForEditorSelection(editor, nls.localize(
|
|
190
|
+
return triggerCodeActionsForEditorSelection(editor, nls.localize(844, "No organize imports action available"), { include: CodeActionKind.SourceOrganizeImports, includeSourceActions: true }, "ifSingle" /* CodeActionAutoApply.IfSingle */, CodeActionTriggerSource.OrganizeImports);
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
export class FixAllAction extends EditorAction {
|
|
194
194
|
constructor() {
|
|
195
195
|
super({
|
|
196
196
|
id: fixAllCommandId,
|
|
197
|
-
label: nls.localize2(
|
|
197
|
+
label: nls.localize2(852, "Fix All"),
|
|
198
198
|
precondition: ContextKeyExpr.and(EditorContextKeys.writable, contextKeyForSupportedActions(CodeActionKind.SourceFixAll))
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
201
|
run(_accessor, editor) {
|
|
202
|
-
return triggerCodeActionsForEditorSelection(editor, nls.localize(
|
|
202
|
+
return triggerCodeActionsForEditorSelection(editor, nls.localize(845, "No fix all action available"), { include: CodeActionKind.SourceFixAll, includeSourceActions: true }, "ifSingle" /* CodeActionAutoApply.IfSingle */, CodeActionTriggerSource.FixAll);
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
export class AutoFixAction extends EditorAction {
|
|
206
206
|
constructor() {
|
|
207
207
|
super({
|
|
208
208
|
id: autoFixCommandId,
|
|
209
|
-
label: nls.localize2(
|
|
209
|
+
label: nls.localize2(853, "Auto Fix..."),
|
|
210
210
|
precondition: ContextKeyExpr.and(EditorContextKeys.writable, contextKeyForSupportedActions(CodeActionKind.QuickFix)),
|
|
211
211
|
kbOpts: {
|
|
212
212
|
kbExpr: EditorContextKeys.textInputFocus,
|
|
@@ -219,7 +219,7 @@ export class AutoFixAction extends EditorAction {
|
|
|
219
219
|
});
|
|
220
220
|
}
|
|
221
221
|
run(_accessor, editor) {
|
|
222
|
-
return triggerCodeActionsForEditorSelection(editor, nls.localize(
|
|
222
|
+
return triggerCodeActionsForEditorSelection(editor, nls.localize(846, "No auto fixes available"), {
|
|
223
223
|
include: CodeActionKind.QuickFix,
|
|
224
224
|
onlyIncludePreferredActions: true
|
|
225
225
|
}, "ifSingle" /* CodeActionAutoApply.IfSingle */, CodeActionTriggerSource.AutoFix);
|