diff --git a/packages/monaco/src/browser/monaco-editor-model.ts b/packages/monaco/src/browser/monaco-editor-model.ts index 89a8193048a58..92b2586d03929 100644 --- a/packages/monaco/src/browser/monaco-editor-model.ts +++ b/packages/monaco/src/browser/monaco-editor-model.ts @@ -50,6 +50,8 @@ export class MonacoEditorModel implements ITextEditorModel, TextEditorDocument { autoSave: 'on' | 'off' = 'on'; autoSaveDelay: number = 500; suppressOpenEditorWhenDirty = false; + lineNumbersMinChars = 3; + /* @deprecated there is no general save timeout, each participant should introduce a sensible timeout */ readonly onWillSaveLoopTimeOut = 1500; protected bufferSavedVersionId: number; diff --git a/packages/monaco/src/browser/monaco-editor-provider.ts b/packages/monaco/src/browser/monaco-editor-provider.ts index 40febe552ca85..6700f76ddfaf9 100644 --- a/packages/monaco/src/browser/monaco-editor-provider.ts +++ b/packages/monaco/src/browser/monaco-editor-provider.ts @@ -287,6 +287,7 @@ export class MonacoEditorProvider { const options = this.createOptions(this.preferencePrefixes, model.uri, model.languageId); options.model = model.textEditorModel; options.readOnly = model.readOnly; + options.lineNumbersMinChars = model.lineNumbersMinChars; return options; } protected updateMonacoEditorOptions(editor: MonacoEditor, event?: EditorPreferenceChange): void {