monaco-editor-core 0.54.0-dev-20251004 → 0.54.0-dev-20251005
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.messages.de.js +1 -1
- package/esm/nls.messages.es.js +1 -1
- package/esm/nls.messages.fr.js +1 -1
- package/esm/nls.messages.it.js +1 -1
- package/esm/nls.messages.ja.js +1 -1
- package/esm/nls.messages.ko.js +1 -1
- package/esm/nls.messages.ru.js +1 -1
- package/esm/nls.messages.zh-cn.js +1 -1
- package/esm/nls.messages.zh-tw.js +1 -1
- package/esm/vs/base/browser/dom.js.map +1 -1
- package/esm/vs/base/browser/fastDomNode.js +0 -1
- package/esm/vs/base/browser/fastDomNode.js.map +1 -1
- package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js +1 -1
- package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js.map +1 -1
- package/esm/vs/base/common/buffer.js.map +1 -1
- package/esm/vs/base/common/errors.js.map +1 -1
- package/esm/vs/base/common/hash.js.map +1 -1
- package/esm/vs/base/common/worker/webWorker.js +26 -22
- package/esm/vs/base/common/worker/webWorker.js.map +1 -1
- package/esm/vs/editor/browser/config/editorConfiguration.js +3 -6
- package/esm/vs/editor/browser/config/editorConfiguration.js.map +1 -1
- package/esm/vs/editor/browser/config/migrateOptions.js +1 -2
- package/esm/vs/editor/browser/config/migrateOptions.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/editContextFactory.js +0 -1
- package/esm/vs/editor/browser/controller/editContext/native/editContextFactory.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js +2 -2
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseHandler.js +2 -2
- package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseTarget.js +7 -8
- package/esm/vs/editor/browser/controller/mouseTarget.js.map +1 -1
- package/esm/vs/editor/browser/controller/pointerHandler.js +0 -2
- package/esm/vs/editor/browser/controller/pointerHandler.js.map +1 -1
- package/esm/vs/editor/browser/coreCommands.js.map +1 -1
- package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
- package/esm/vs/editor/browser/editorDom.js +0 -2
- package/esm/vs/editor/browser/editorDom.js.map +1 -1
- package/esm/vs/editor/browser/editorExtensions.js.map +1 -1
- package/esm/vs/editor/browser/gpu/gpuUtils.js +1 -1
- package/esm/vs/editor/browser/gpu/gpuUtils.js.map +1 -1
- package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -1
- package/esm/vs/editor/browser/gpu/viewGpuContext.js.map +1 -1
- package/esm/vs/editor/browser/services/abstractCodeEditorService.js.map +1 -1
- package/esm/vs/editor/browser/services/bulkEditService.js.map +1 -1
- package/esm/vs/editor/browser/services/codeEditorService.js.map +1 -1
- package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
- package/esm/vs/editor/browser/services/hoverService/hoverService.js +1 -1
- package/esm/vs/editor/browser/services/hoverService/hoverService.js.map +1 -1
- package/esm/vs/editor/browser/services/hoverService/hoverWidget.js +1 -1
- package/esm/vs/editor/browser/services/hoverService/hoverWidget.js.map +1 -1
- package/esm/vs/editor/browser/services/openerService.js.map +1 -1
- package/esm/vs/editor/browser/view.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +1 -0
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js +1 -0
- package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js.map +1 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorContributions.js.map +1 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +4 -2
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/delegatingEditorImpl.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/utils.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/utils.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +2 -2
- package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js.map +1 -1
- package/esm/vs/editor/common/config/editorOptions.js +121 -72
- package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
- package/esm/vs/editor/common/config/fontInfo.js +32 -16
- package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
- package/esm/vs/editor/common/config/fontInfoFromSettings.js +16 -0
- package/esm/vs/editor/common/config/fontInfoFromSettings.js.map +1 -0
- package/esm/vs/editor/common/core/edits/edit.js +1 -0
- package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
- package/esm/vs/editor/common/core/edits/stringEdit.js +2 -0
- package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
- package/esm/vs/editor/common/core/position.js +1 -1
- package/esm/vs/editor/common/core/position.js.map +1 -1
- package/esm/vs/editor/common/core/range.js +1 -1
- package/esm/vs/editor/common/core/range.js.map +1 -1
- package/esm/vs/editor/common/core/selection.js +1 -1
- package/esm/vs/editor/common/core/selection.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
- package/esm/vs/editor/common/editorCommon.js.map +1 -1
- package/esm/vs/editor/common/languages.js +1 -2
- package/esm/vs/editor/common/languages.js.map +1 -1
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js +14 -13
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js.map +1 -1
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js +2 -0
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js.map +1 -1
- package/esm/vs/editor/common/model/textModel.js +1 -1
- package/esm/vs/editor/common/model/textModel.js.map +1 -1
- package/esm/vs/editor/common/model.js +1 -1
- package/esm/vs/editor/common/model.js.map +1 -1
- package/esm/vs/editor/common/services/editorBaseApi.js +0 -2
- package/esm/vs/editor/common/services/editorBaseApi.js.map +1 -1
- package/esm/vs/editor/common/services/editorWebWorker.js +1 -0
- package/esm/vs/editor/common/services/editorWebWorker.js.map +1 -1
- package/esm/vs/editor/common/services/editorWorkerHost.js.map +1 -1
- package/esm/vs/editor/common/services/modelService.js +14 -21
- package/esm/vs/editor/common/services/modelService.js.map +1 -1
- package/esm/vs/editor/common/textModelEditSource.js +2 -1
- package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +40 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
- package/esm/vs/editor/common/viewModel/viewModelImpl.js +2 -1
- package/esm/vs/editor/common/viewModel/viewModelImpl.js.map +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +1 -0
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js.map +1 -1
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js +1 -1
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js.map +1 -1
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js.map +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js.map +1 -1
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +1 -1
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js.map +1 -1
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js.map +1 -1
- package/esm/vs/editor/editor.api.d.ts +8 -8
- package/esm/vs/editor/standalone/browser/standaloneWebWorker.js.map +1 -1
- package/monaco.d.ts +8 -8
- package/package.json +2 -2
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as arrays from '../../../base/common/arrays.js';
|
|
6
6
|
import * as objects from '../../../base/common/objects.js';
|
|
7
7
|
import * as platform from '../../../base/common/platform.js';
|
|
8
|
+
import { EDITOR_FONT_DEFAULTS, FONT_VARIATION_OFF, FONT_VARIATION_TRANSLATE, FontInfo } from './fontInfo.js';
|
|
8
9
|
import { EDITOR_MODEL_DEFAULTS } from '../core/misc/textModelDefaults.js';
|
|
9
10
|
import { USUAL_WORD_SEPARATORS } from '../core/wordHelper.js';
|
|
10
11
|
import * as nls from '../../../nls.js';
|
|
@@ -85,12 +86,11 @@ function applyUpdate(value, update) {
|
|
|
85
86
|
* @internal
|
|
86
87
|
*/
|
|
87
88
|
class ComputedEditorOption {
|
|
88
|
-
constructor(id) {
|
|
89
|
+
constructor(id, defaultValue) {
|
|
89
90
|
this.schema = undefined;
|
|
90
91
|
this.id = id;
|
|
91
92
|
this.name = '_never_';
|
|
92
|
-
|
|
93
|
-
this.defaultValue = undefined;
|
|
93
|
+
this.defaultValue = defaultValue;
|
|
94
94
|
}
|
|
95
95
|
applyUpdate(value, update) {
|
|
96
96
|
return applyUpdate(value, update);
|
|
@@ -109,13 +109,6 @@ class SimpleEditorOption {
|
|
|
109
109
|
applyUpdate(value, update) {
|
|
110
110
|
return applyUpdate(value, update);
|
|
111
111
|
}
|
|
112
|
-
validate(input) {
|
|
113
|
-
if (typeof input === 'undefined') {
|
|
114
|
-
return this.defaultValue;
|
|
115
|
-
}
|
|
116
|
-
// eslint-disable-next-line local/code-no-any-casts
|
|
117
|
-
return input;
|
|
118
|
-
}
|
|
119
112
|
compute(env, options, value) {
|
|
120
113
|
return value;
|
|
121
114
|
}
|
|
@@ -149,13 +142,13 @@ class EditorBooleanOption extends SimpleEditorOption {
|
|
|
149
142
|
* @internal
|
|
150
143
|
*/
|
|
151
144
|
export function clampedInt(value, defaultValue, minimum, maximum) {
|
|
152
|
-
if (typeof value === '
|
|
153
|
-
|
|
145
|
+
if (typeof value === 'string') {
|
|
146
|
+
value = parseInt(value, 10);
|
|
154
147
|
}
|
|
155
|
-
|
|
156
|
-
if (isNaN(r)) {
|
|
148
|
+
if (typeof value !== 'number' || isNaN(value)) {
|
|
157
149
|
return defaultValue;
|
|
158
150
|
}
|
|
151
|
+
let r = value;
|
|
159
152
|
r = Math.max(minimum, r);
|
|
160
153
|
r = Math.min(maximum, r);
|
|
161
154
|
return r | 0;
|
|
@@ -200,14 +193,13 @@ class EditorFloatOption extends SimpleEditorOption {
|
|
|
200
193
|
return n;
|
|
201
194
|
}
|
|
202
195
|
static float(value, defaultValue) {
|
|
203
|
-
if (typeof value === '
|
|
204
|
-
|
|
196
|
+
if (typeof value === 'string') {
|
|
197
|
+
value = parseFloat(value);
|
|
205
198
|
}
|
|
206
|
-
if (typeof value
|
|
199
|
+
if (typeof value !== 'number' || isNaN(value)) {
|
|
207
200
|
return defaultValue;
|
|
208
201
|
}
|
|
209
|
-
|
|
210
|
-
return (isNaN(r) ? defaultValue : r);
|
|
202
|
+
return value;
|
|
211
203
|
}
|
|
212
204
|
constructor(id, name, defaultValue, validationFn, schema, minimum, maximum) {
|
|
213
205
|
if (typeof schema !== 'undefined') {
|
|
@@ -262,8 +254,7 @@ class EditorStringEnumOption extends SimpleEditorOption {
|
|
|
262
254
|
constructor(id, name, defaultValue, allowedValues, schema = undefined) {
|
|
263
255
|
if (typeof schema !== 'undefined') {
|
|
264
256
|
schema.type = 'string';
|
|
265
|
-
|
|
266
|
-
schema.enum = allowedValues;
|
|
257
|
+
schema.enum = allowedValues.slice(0);
|
|
267
258
|
schema.default = defaultValue;
|
|
268
259
|
}
|
|
269
260
|
super(id, name, defaultValue, schema);
|
|
@@ -291,7 +282,6 @@ class EditorEnumOption extends BaseEditorOption {
|
|
|
291
282
|
if (this._allowedValues.indexOf(input) === -1) {
|
|
292
283
|
return this.defaultValue;
|
|
293
284
|
}
|
|
294
|
-
// eslint-disable-next-line local/code-no-any-casts
|
|
295
285
|
return this._convert(input);
|
|
296
286
|
}
|
|
297
287
|
}
|
|
@@ -430,7 +420,7 @@ export function cursorStyleFromString(cursorStyle) {
|
|
|
430
420
|
//#region editorClassName
|
|
431
421
|
class EditorClassName extends ComputedEditorOption {
|
|
432
422
|
constructor() {
|
|
433
|
-
super(162 /* EditorOption.editorClassName
|
|
423
|
+
super(162 /* EditorOption.editorClassName */, '');
|
|
434
424
|
}
|
|
435
425
|
compute(env, options, _) {
|
|
436
426
|
const classNames = ['monaco-editor'];
|
|
@@ -557,11 +547,11 @@ class EditorFind extends BaseEditorOption {
|
|
|
557
547
|
return {
|
|
558
548
|
cursorMoveOnType: boolean(input.cursorMoveOnType, this.defaultValue.cursorMoveOnType),
|
|
559
549
|
findOnType: boolean(input.findOnType, this.defaultValue.findOnType),
|
|
560
|
-
seedSearchStringFromSelection: typeof
|
|
561
|
-
? (
|
|
550
|
+
seedSearchStringFromSelection: typeof input.seedSearchStringFromSelection === 'boolean'
|
|
551
|
+
? (input.seedSearchStringFromSelection ? 'always' : 'never')
|
|
562
552
|
: stringSet(input.seedSearchStringFromSelection, this.defaultValue.seedSearchStringFromSelection, ['never', 'always', 'selection']),
|
|
563
|
-
autoFindInSelection: typeof
|
|
564
|
-
? (
|
|
553
|
+
autoFindInSelection: typeof input.autoFindInSelection === 'boolean'
|
|
554
|
+
? (input.autoFindInSelection ? 'always' : 'never')
|
|
565
555
|
: stringSet(input.autoFindInSelection, this.defaultValue.autoFindInSelection, ['never', 'always', 'multiline']),
|
|
566
556
|
globalFindClipboard: boolean(input.globalFindClipboard, this.defaultValue.globalFindClipboard),
|
|
567
557
|
addExtraSpaceOnTop: boolean(input.addExtraSpaceOnTop, this.defaultValue.addExtraSpaceOnTop),
|
|
@@ -621,9 +611,9 @@ export class EditorFontLigatures extends BaseEditorOption {
|
|
|
621
611
|
*/
|
|
622
612
|
export class EditorFontVariations extends BaseEditorOption {
|
|
623
613
|
// Text is laid out using default settings.
|
|
624
|
-
static { this.OFF =
|
|
614
|
+
static { this.OFF = FONT_VARIATION_OFF; }
|
|
625
615
|
// Translate `fontWeight` config to the `font-variation-settings` CSS property.
|
|
626
|
-
static { this.TRANSLATE =
|
|
616
|
+
static { this.TRANSLATE = FONT_VARIATION_TRANSLATE; }
|
|
627
617
|
constructor() {
|
|
628
618
|
super(63 /* EditorOption.fontVariations */, 'fontVariations', EditorFontVariations.OFF, {
|
|
629
619
|
anyOf: [
|
|
@@ -668,7 +658,24 @@ export class EditorFontVariations extends BaseEditorOption {
|
|
|
668
658
|
//#region fontInfo
|
|
669
659
|
class EditorFontInfo extends ComputedEditorOption {
|
|
670
660
|
constructor() {
|
|
671
|
-
super(59 /* EditorOption.fontInfo
|
|
661
|
+
super(59 /* EditorOption.fontInfo */, new FontInfo({
|
|
662
|
+
pixelRatio: 0,
|
|
663
|
+
fontFamily: '',
|
|
664
|
+
fontWeight: '',
|
|
665
|
+
fontSize: 0,
|
|
666
|
+
fontFeatureSettings: '',
|
|
667
|
+
fontVariationSettings: '',
|
|
668
|
+
lineHeight: 0,
|
|
669
|
+
letterSpacing: 0,
|
|
670
|
+
isMonospace: false,
|
|
671
|
+
typicalHalfwidthCharacterWidth: 0,
|
|
672
|
+
typicalFullwidthCharacterWidth: 0,
|
|
673
|
+
canUseHalfwidthRightwardsArrow: false,
|
|
674
|
+
spaceWidth: 0,
|
|
675
|
+
middotWidth: 0,
|
|
676
|
+
wsmiddotWidth: 0,
|
|
677
|
+
maxDigitWidth: 0,
|
|
678
|
+
}, false));
|
|
672
679
|
}
|
|
673
680
|
compute(env, options, _) {
|
|
674
681
|
return env.fontInfo;
|
|
@@ -678,7 +685,7 @@ class EditorFontInfo extends ComputedEditorOption {
|
|
|
678
685
|
//#region effectiveCursorStyle
|
|
679
686
|
class EffectiveCursorStyle extends ComputedEditorOption {
|
|
680
687
|
constructor() {
|
|
681
|
-
super(161 /* EditorOption.effectiveCursorStyle
|
|
688
|
+
super(161 /* EditorOption.effectiveCursorStyle */, TextEditorCursorStyle.Line);
|
|
682
689
|
}
|
|
683
690
|
compute(env, options, _) {
|
|
684
691
|
return env.inputMode === 'overtype' ?
|
|
@@ -690,7 +697,7 @@ class EffectiveCursorStyle extends ComputedEditorOption {
|
|
|
690
697
|
//#region effectiveExperimentalEditContext
|
|
691
698
|
class EffectiveEditContextEnabled extends ComputedEditorOption {
|
|
692
699
|
constructor() {
|
|
693
|
-
super(170 /* EditorOption.effectiveEditContext
|
|
700
|
+
super(170 /* EditorOption.effectiveEditContext */, false);
|
|
694
701
|
}
|
|
695
702
|
compute(env, options) {
|
|
696
703
|
return env.editContextSupported && options.get(44 /* EditorOption.editContext */);
|
|
@@ -700,7 +707,7 @@ class EffectiveEditContextEnabled extends ComputedEditorOption {
|
|
|
700
707
|
//#region effectiveAllowVariableFonts
|
|
701
708
|
class EffectiveAllowVariableFonts extends ComputedEditorOption {
|
|
702
709
|
constructor() {
|
|
703
|
-
super(172 /* EditorOption.effectiveAllowVariableFonts
|
|
710
|
+
super(172 /* EditorOption.effectiveAllowVariableFonts */, false);
|
|
704
711
|
}
|
|
705
712
|
compute(env, options) {
|
|
706
713
|
const accessibilitySupport = env.accessibilitySupport;
|
|
@@ -862,12 +869,12 @@ class EditorGoToLocation extends BaseEditorOption {
|
|
|
862
869
|
const input = _input;
|
|
863
870
|
return {
|
|
864
871
|
multiple: stringSet(input.multiple, this.defaultValue.multiple, ['peek', 'gotoAndPeek', 'goto']),
|
|
865
|
-
multipleDefinitions:
|
|
866
|
-
multipleTypeDefinitions:
|
|
867
|
-
multipleDeclarations:
|
|
868
|
-
multipleImplementations:
|
|
869
|
-
multipleReferences:
|
|
870
|
-
multipleTests:
|
|
872
|
+
multipleDefinitions: stringSet(input.multipleDefinitions, 'peek', ['peek', 'gotoAndPeek', 'goto']),
|
|
873
|
+
multipleTypeDefinitions: stringSet(input.multipleTypeDefinitions, 'peek', ['peek', 'gotoAndPeek', 'goto']),
|
|
874
|
+
multipleDeclarations: stringSet(input.multipleDeclarations, 'peek', ['peek', 'gotoAndPeek', 'goto']),
|
|
875
|
+
multipleImplementations: stringSet(input.multipleImplementations, 'peek', ['peek', 'gotoAndPeek', 'goto']),
|
|
876
|
+
multipleReferences: stringSet(input.multipleReferences, 'peek', ['peek', 'gotoAndPeek', 'goto']),
|
|
877
|
+
multipleTests: stringSet(input.multipleTests, 'peek', ['peek', 'gotoAndPeek', 'goto']),
|
|
871
878
|
alternativeDefinitionCommand: EditorStringOption.string(input.alternativeDefinitionCommand, this.defaultValue.alternativeDefinitionCommand),
|
|
872
879
|
alternativeTypeDefinitionCommand: EditorStringOption.string(input.alternativeTypeDefinitionCommand, this.defaultValue.alternativeTypeDefinitionCommand),
|
|
873
880
|
alternativeDeclarationCommand: EditorStringOption.string(input.alternativeDeclarationCommand, this.defaultValue.alternativeDeclarationCommand),
|
|
@@ -936,7 +943,44 @@ class EditorHover extends BaseEditorOption {
|
|
|
936
943
|
*/
|
|
937
944
|
export class EditorLayoutInfoComputer extends ComputedEditorOption {
|
|
938
945
|
constructor() {
|
|
939
|
-
super(165 /* EditorOption.layoutInfo
|
|
946
|
+
super(165 /* EditorOption.layoutInfo */, {
|
|
947
|
+
width: 0,
|
|
948
|
+
height: 0,
|
|
949
|
+
glyphMarginLeft: 0,
|
|
950
|
+
glyphMarginWidth: 0,
|
|
951
|
+
glyphMarginDecorationLaneCount: 0,
|
|
952
|
+
lineNumbersLeft: 0,
|
|
953
|
+
lineNumbersWidth: 0,
|
|
954
|
+
decorationsLeft: 0,
|
|
955
|
+
decorationsWidth: 0,
|
|
956
|
+
contentLeft: 0,
|
|
957
|
+
contentWidth: 0,
|
|
958
|
+
minimap: {
|
|
959
|
+
renderMinimap: 0 /* RenderMinimap.None */,
|
|
960
|
+
minimapLeft: 0,
|
|
961
|
+
minimapWidth: 0,
|
|
962
|
+
minimapHeightIsEditorHeight: false,
|
|
963
|
+
minimapIsSampling: false,
|
|
964
|
+
minimapScale: 1,
|
|
965
|
+
minimapLineHeight: 1,
|
|
966
|
+
minimapCanvasInnerWidth: 0,
|
|
967
|
+
minimapCanvasInnerHeight: 0,
|
|
968
|
+
minimapCanvasOuterWidth: 0,
|
|
969
|
+
minimapCanvasOuterHeight: 0,
|
|
970
|
+
},
|
|
971
|
+
viewportColumn: 0,
|
|
972
|
+
isWordWrapMinified: false,
|
|
973
|
+
isViewportWrapping: false,
|
|
974
|
+
wrappingColumn: -1,
|
|
975
|
+
verticalScrollbarWidth: 0,
|
|
976
|
+
horizontalScrollbarHeight: 0,
|
|
977
|
+
overviewRuler: {
|
|
978
|
+
top: 0,
|
|
979
|
+
width: 0,
|
|
980
|
+
height: 0,
|
|
981
|
+
right: 0
|
|
982
|
+
}
|
|
983
|
+
});
|
|
940
984
|
}
|
|
941
985
|
compute(env, options, _) {
|
|
942
986
|
return EditorLayoutInfoComputer.computeLayout(options, {
|
|
@@ -1555,7 +1599,7 @@ class EditorMinimap extends BaseEditorOption {
|
|
|
1555
1599
|
const input = _input;
|
|
1556
1600
|
// Validate mark section header regex
|
|
1557
1601
|
let markSectionHeaderRegex = this.defaultValue.markSectionHeaderRegex;
|
|
1558
|
-
const inputRegex =
|
|
1602
|
+
const inputRegex = input.markSectionHeaderRegex;
|
|
1559
1603
|
if (typeof inputRegex === 'string') {
|
|
1560
1604
|
try {
|
|
1561
1605
|
new RegExp(inputRegex, 'd');
|
|
@@ -1575,8 +1619,8 @@ class EditorMinimap extends BaseEditorOption {
|
|
|
1575
1619
|
showRegionSectionHeaders: boolean(input.showRegionSectionHeaders, this.defaultValue.showRegionSectionHeaders),
|
|
1576
1620
|
showMarkSectionHeaders: boolean(input.showMarkSectionHeaders, this.defaultValue.showMarkSectionHeaders),
|
|
1577
1621
|
markSectionHeaderRegex: markSectionHeaderRegex,
|
|
1578
|
-
sectionHeaderFontSize: EditorFloatOption.clamp(input.sectionHeaderFontSize
|
|
1579
|
-
sectionHeaderLetterSpacing: EditorFloatOption.clamp(input.sectionHeaderLetterSpacing
|
|
1622
|
+
sectionHeaderFontSize: EditorFloatOption.clamp(EditorFloatOption.float(input.sectionHeaderFontSize, this.defaultValue.sectionHeaderFontSize), 4, 32),
|
|
1623
|
+
sectionHeaderLetterSpacing: EditorFloatOption.clamp(EditorFloatOption.float(input.sectionHeaderLetterSpacing, this.defaultValue.sectionHeaderLetterSpacing), 0, 5),
|
|
1580
1624
|
};
|
|
1581
1625
|
}
|
|
1582
1626
|
}
|
|
@@ -1652,7 +1696,7 @@ class EditorParameterHints extends BaseEditorOption {
|
|
|
1652
1696
|
//#region pixelRatio
|
|
1653
1697
|
class EditorPixelRatio extends ComputedEditorOption {
|
|
1654
1698
|
constructor() {
|
|
1655
|
-
super(163 /* EditorOption.pixelRatio
|
|
1699
|
+
super(163 /* EditorOption.pixelRatio */, 1);
|
|
1656
1700
|
}
|
|
1657
1701
|
compute(env, options, _) {
|
|
1658
1702
|
return env.pixelRatio;
|
|
@@ -2097,8 +2141,8 @@ class UnicodeHighlight extends BaseEditorOption {
|
|
|
2097
2141
|
ambiguousCharacters: boolean(input.ambiguousCharacters, this.defaultValue.ambiguousCharacters),
|
|
2098
2142
|
includeComments: primitiveSet(input.includeComments, inUntrustedWorkspace, [true, false, inUntrustedWorkspace]),
|
|
2099
2143
|
includeStrings: primitiveSet(input.includeStrings, inUntrustedWorkspace, [true, false, inUntrustedWorkspace]),
|
|
2100
|
-
allowedCharacters: this.validateBooleanMap(
|
|
2101
|
-
allowedLocales: this.validateBooleanMap(
|
|
2144
|
+
allowedCharacters: this.validateBooleanMap(input.allowedCharacters, this.defaultValue.allowedCharacters),
|
|
2145
|
+
allowedLocales: this.validateBooleanMap(input.allowedLocales, this.defaultValue.allowedLocales),
|
|
2102
2146
|
};
|
|
2103
2147
|
}
|
|
2104
2148
|
validateBooleanMap(map, defaultValue) {
|
|
@@ -2264,18 +2308,32 @@ class InlineEditorSuggest extends BaseEditorOption {
|
|
|
2264
2308
|
syntaxHighlightingEnabled: boolean(input.syntaxHighlightingEnabled, this.defaultValue.syntaxHighlightingEnabled),
|
|
2265
2309
|
minShowDelay: EditorIntOption.clampedInt(input.minShowDelay, 0, 0, 10000),
|
|
2266
2310
|
suppressInSnippetMode: boolean(input.suppressInSnippetMode, this.defaultValue.suppressInSnippetMode),
|
|
2267
|
-
edits:
|
|
2268
|
-
enabled: boolean(input.edits?.enabled, this.defaultValue.edits.enabled),
|
|
2269
|
-
showCollapsed: boolean(input.edits?.showCollapsed, this.defaultValue.edits.showCollapsed),
|
|
2270
|
-
allowCodeShifting: stringSet(input.edits?.allowCodeShifting, this.defaultValue.edits.allowCodeShifting, ['always', 'horizontal', 'never']),
|
|
2271
|
-
renderSideBySide: stringSet(input.edits?.renderSideBySide, this.defaultValue.edits.renderSideBySide, ['never', 'auto']),
|
|
2272
|
-
},
|
|
2311
|
+
edits: this._validateEdits(input.edits),
|
|
2273
2312
|
triggerCommandOnProviderChange: boolean(input.triggerCommandOnProviderChange, this.defaultValue.triggerCommandOnProviderChange),
|
|
2274
|
-
experimental:
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2313
|
+
experimental: this._validateExperimental(input.experimental),
|
|
2314
|
+
};
|
|
2315
|
+
}
|
|
2316
|
+
_validateEdits(_input) {
|
|
2317
|
+
if (!_input || typeof _input !== 'object') {
|
|
2318
|
+
return this.defaultValue.edits;
|
|
2319
|
+
}
|
|
2320
|
+
const input = _input;
|
|
2321
|
+
return {
|
|
2322
|
+
enabled: boolean(input.enabled, this.defaultValue.edits.enabled),
|
|
2323
|
+
showCollapsed: boolean(input.showCollapsed, this.defaultValue.edits.showCollapsed),
|
|
2324
|
+
allowCodeShifting: stringSet(input.allowCodeShifting, this.defaultValue.edits.allowCodeShifting, ['always', 'horizontal', 'never']),
|
|
2325
|
+
renderSideBySide: stringSet(input.renderSideBySide, this.defaultValue.edits.renderSideBySide, ['never', 'auto']),
|
|
2326
|
+
};
|
|
2327
|
+
}
|
|
2328
|
+
_validateExperimental(_input) {
|
|
2329
|
+
if (!_input || typeof _input !== 'object') {
|
|
2330
|
+
return this.defaultValue.experimental;
|
|
2331
|
+
}
|
|
2332
|
+
const input = _input;
|
|
2333
|
+
return {
|
|
2334
|
+
suppressInlineSuggestions: EditorStringOption.string(input.suppressInlineSuggestions, this.defaultValue.experimental.suppressInlineSuggestions),
|
|
2335
|
+
showOnSuggestConflict: stringSet(input.showOnSuggestConflict, this.defaultValue.experimental.showOnSuggestConflict, ['always', 'never', 'whenSuggestListIsIncomplete']),
|
|
2336
|
+
emptyResponseInformation: boolean(input.emptyResponseInformation, this.defaultValue.experimental.emptyResponseInformation),
|
|
2279
2337
|
};
|
|
2280
2338
|
}
|
|
2281
2339
|
}
|
|
@@ -2385,7 +2443,6 @@ class GuideOptions extends BaseEditorOption {
|
|
|
2385
2443
|
}
|
|
2386
2444
|
}
|
|
2387
2445
|
function primitiveSet(value, defaultValue, allowedValues) {
|
|
2388
|
-
// eslint-disable-next-line local/code-no-any-casts
|
|
2389
2446
|
const idx = allowedValues.indexOf(value);
|
|
2390
2447
|
if (idx === -1) {
|
|
2391
2448
|
return defaultValue;
|
|
@@ -2826,7 +2883,12 @@ class WrappingIndentOption extends BaseEditorOption {
|
|
|
2826
2883
|
}
|
|
2827
2884
|
class EditorWrappingInfoComputer extends ComputedEditorOption {
|
|
2828
2885
|
constructor() {
|
|
2829
|
-
super(166 /* EditorOption.wrappingInfo
|
|
2886
|
+
super(166 /* EditorOption.wrappingInfo */, {
|
|
2887
|
+
isDominatedByLongLines: false,
|
|
2888
|
+
isWordWrapMinified: false,
|
|
2889
|
+
isViewportWrapping: false,
|
|
2890
|
+
wrappingColumn: -1
|
|
2891
|
+
});
|
|
2830
2892
|
}
|
|
2831
2893
|
compute(env, options, _) {
|
|
2832
2894
|
const layoutInfo = options.get(165 /* EditorOption.layoutInfo */);
|
|
@@ -2909,19 +2971,6 @@ class EditorPasteAs extends BaseEditorOption {
|
|
|
2909
2971
|
}
|
|
2910
2972
|
}
|
|
2911
2973
|
//#endregion
|
|
2912
|
-
const DEFAULT_WINDOWS_FONT_FAMILY = 'Consolas, \'Courier New\', monospace';
|
|
2913
|
-
const DEFAULT_MAC_FONT_FAMILY = 'Menlo, Monaco, \'Courier New\', monospace';
|
|
2914
|
-
const DEFAULT_LINUX_FONT_FAMILY = '\'Droid Sans Mono\', \'monospace\', monospace';
|
|
2915
|
-
/**
|
|
2916
|
-
* @internal
|
|
2917
|
-
*/
|
|
2918
|
-
export const EDITOR_FONT_DEFAULTS = {
|
|
2919
|
-
fontFamily: (platform.isMacintosh ? DEFAULT_MAC_FONT_FAMILY : (platform.isWindows ? DEFAULT_WINDOWS_FONT_FAMILY : DEFAULT_LINUX_FONT_FAMILY)),
|
|
2920
|
-
fontWeight: 'normal',
|
|
2921
|
-
fontSize: (platform.isMacintosh ? 12 : 14),
|
|
2922
|
-
lineHeight: 0,
|
|
2923
|
-
letterSpacing: 0,
|
|
2924
|
-
};
|
|
2925
2974
|
/**
|
|
2926
2975
|
* @internal
|
|
2927
2976
|
*/
|