diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index ee224f1f6fdd7c48fc84232c3a325d0692169e8d..b1682623e6b9ec0d21ca6b09de5f0942248dd757 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -8,7 +8,7 @@ import { Emitter, Event } from 'vs/base/common/event'; import { Disposable } from 'vs/base/common/lifecycle'; import * as objects from 'vs/base/common/objects'; import * as arrays from 'vs/base/common/arrays'; -import { IEditorOptions, editorOptionsRegistry, ValidatedEditorOptions, IEnvironmentalOptions, IComputedEditorOptions, ConfigurationChangedEvent, EDITOR_MODEL_DEFAULTS, EditorOption, FindComputedEditorOptionValueById } from 'vs/editor/common/config/editorOptions'; +import { IEditorOptions, editorOptionsRegistry, ValidatedEditorOptions, IEnvironmentalOptions, IComputedEditorOptions, ConfigurationChangedEvent, EDITOR_MODEL_DEFAULTS, EditorOption, FindComputedEditorOptionValueById, IComputeOptionsMemory } from 'vs/editor/common/config/editorOptions'; import { EditorZoom } from 'vs/editor/common/config/editorZoom'; import { BareFontInfo, FontInfo } from 'vs/editor/common/config/fontInfo'; import { IConfiguration, IDimension } from 'vs/editor/common/editorCommon'; @@ -284,6 +284,7 @@ export abstract class CommonEditorConfiguration extends Disposable implements IC public readonly onDidChange: Event = this._onDidChange.event; public readonly isSimpleWidget: boolean; + private _computeOptionsMemory: IComputeOptionsMemory; public options!: ComputedEditorOptions; private _isDominatedByLongLines: boolean; @@ -299,6 +300,7 @@ export abstract class CommonEditorConfiguration extends Disposable implements IC this.isSimpleWidget = isSimpleWidget; this._isDominatedByLongLines = false; + this._computeOptionsMemory = {}; this._viewLineCount = 1; this._lineNumbersDigitCount = 1; @@ -344,6 +346,7 @@ export abstract class CommonEditorConfiguration extends Disposable implements IC const partialEnv = this._getEnvConfiguration(); const bareFontInfo = BareFontInfo.createFromValidatedSettings(this._validatedOptions, partialEnv.zoomLevel, this.isSimpleWidget); const env: IEnvironmentalOptions = { + memory: this._computeOptionsMemory, outerWidth: partialEnv.outerWidth, outerHeight: partialEnv.outerHeight, fontInfo: this.readConfiguration(bareFontInfo), diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 11fadefd61433bfd30efd84801211adc7f3bcce6..913ac0ecb955f4330bbc760d3792d4860605505e 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -687,6 +687,7 @@ export interface IComputedEditorOptions { * @internal */ export interface IEnvironmentalOptions { + readonly memory: IComputeOptionsMemory | null; readonly outerWidth: number; readonly outerHeight: number; readonly fontInfo: FontInfo; @@ -700,6 +701,12 @@ export interface IEnvironmentalOptions { readonly accessibilitySupport: AccessibilitySupport; } +/** + * @internal + */ +export interface IComputeOptionsMemory { +} + export interface IEditorOption { readonly id: K1; readonly name: string; @@ -1756,6 +1763,7 @@ export interface EditorLayoutInfo { * @internal */ export interface EditorLayoutInfoComputerEnv { + memory: IComputeOptionsMemory | null; outerWidth: number; outerHeight: number; lineHeight: number; @@ -1780,6 +1788,7 @@ export class EditorLayoutInfoComputer extends ComputedEditorOption { options._write(EditorOption.lineNumbers, lineNumbersOptions); const actual = EditorLayoutInfoComputer.computeLayout(options, { + memory: null, outerWidth: input.outerWidth, outerHeight: input.outerHeight, lineHeight: input.lineHeight,