From 8349ba385a89c3cf62c51de405a849e06a588fbc Mon Sep 17 00:00:00 2001 From: Alexandru Dima Date: Mon, 6 Jan 2020 16:04:38 +0100 Subject: [PATCH] Fixes microsoft/monaco-editor#1726: Use enum value as default for autoIndent --- src/vs/editor/common/config/editorOptions.ts | 2 +- src/vs/editor/editor.api.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index b472101432ef0..3adac8cf46b92 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -661,7 +661,7 @@ export interface IEnvironmentalOptions { export interface IEditorOption { readonly id: K1; readonly name: string; - readonly defaultValue: V; + defaultValue: V; /** * @internal */ diff --git a/src/vs/editor/editor.api.ts b/src/vs/editor/editor.api.ts index c7b3946f704e9..e6a49f1ba6e54 100644 --- a/src/vs/editor/editor.api.ts +++ b/src/vs/editor/editor.api.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { EditorOptions, WrappingIndent } from 'vs/editor/common/config/editorOptions'; +import { EditorOptions, WrappingIndent, EditorAutoIndentStrategy } from 'vs/editor/common/config/editorOptions'; import { createMonacoBaseAPI } from 'vs/editor/common/standalone/standaloneBase'; import { createMonacoEditorAPI } from 'vs/editor/standalone/browser/standaloneEditor'; import { createMonacoLanguagesAPI } from 'vs/editor/standalone/browser/standaloneLanguages'; @@ -11,10 +11,10 @@ import { createMonacoLanguagesAPI } from 'vs/editor/standalone/browser/standalon const global: any = self; // Set defaults for standalone editor -(EditorOptions.wrappingIndent).defaultValue = WrappingIndent.None; -(EditorOptions.glyphMargin).defaultValue = false; -(EditorOptions.autoIndent).defaultValue = 'advanced'; -(EditorOptions.overviewRulerLanes).defaultValue = 2; +EditorOptions.wrappingIndent.defaultValue = WrappingIndent.None; +EditorOptions.glyphMargin.defaultValue = false; +EditorOptions.autoIndent.defaultValue = EditorAutoIndentStrategy.Advanced; +EditorOptions.overviewRulerLanes.defaultValue = 2; const api = createMonacoBaseAPI(); api.editor = createMonacoEditorAPI();