From ea47e6a1addca4fccf5a542c089984d16f07a51a Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 29 Jun 2016 13:28:49 +0200 Subject: [PATCH] Fixes #8412: Rename editor.indentGuides to editor.renderIndentGuides --- .../browser/viewParts/indentGuides/indentGuides.ts | 6 +++--- src/vs/editor/common/config/commonEditorConfig.ts | 12 ++++++------ src/vs/editor/common/config/defaultConfig.ts | 2 +- src/vs/editor/common/editorCommon.ts | 14 +++++++------- src/vs/monaco.d.ts | 6 +++--- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts b/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts index 39d12871731..411fd016e03 100644 --- a/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts +++ b/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts @@ -24,7 +24,7 @@ export class IndentGuidesOverlay extends DynamicViewOverlay { this._context = context; this._lineHeight = this._context.configuration.editor.lineHeight; this._spaceWidth = this._context.configuration.editor.fontInfo.spaceWidth; - this._enabled = this._context.configuration.editor.viewInfo.indentGuides; + this._enabled = this._context.configuration.editor.viewInfo.renderIndentGuides; this._renderResult = null; this._context.addEventHandler(this); @@ -56,8 +56,8 @@ export class IndentGuidesOverlay extends DynamicViewOverlay { if (e.fontInfo) { this._spaceWidth = this._context.configuration.editor.fontInfo.spaceWidth; } - if (e.viewInfo.indentGuides) { - this._enabled = this._context.configuration.editor.viewInfo.indentGuides; + if (e.viewInfo.renderIndentGuides) { + this._enabled = this._context.configuration.editor.viewInfo.renderIndentGuides; } return true; } diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index e50325a7759..05a6a75c964 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -202,7 +202,7 @@ class InternalEditorOptionsHelper { stopRenderingLineAfter: stopRenderingLineAfter, renderWhitespace: toBoolean(opts.renderWhitespace), renderControlCharacters: toBoolean(opts.renderControlCharacters), - indentGuides: toBoolean(opts.indentGuides), + renderIndentGuides: toBoolean(opts.renderIndentGuides), scrollbar: scrollbar, }); @@ -697,11 +697,11 @@ let editorConfiguration:IConfigurationNode = { default: DefaultConfig.editor.renderControlCharacters, description: nls.localize('renderControlCharacters', "Controls whether the editor should render control characters") }, - // 'editor.indentGuides': { - // 'type': 'boolean', - // default: DefaultConfig.editor.indentGuides, - // description: nls.localize('indentGuides', "Controls whether the editor should render indent guides") - // }, + 'editor.renderIndentGuides': { + 'type': 'boolean', + default: DefaultConfig.editor.renderIndentGuides, + description: nls.localize('renderIndentGuides', "Controls whether the editor should render indent guides") + }, 'editor.referenceInfos' : { 'type': 'boolean', 'default': DefaultConfig.editor.referenceInfos, diff --git a/src/vs/editor/common/config/defaultConfig.ts b/src/vs/editor/common/config/defaultConfig.ts index 275e5d2f8f7..1fa86749274 100644 --- a/src/vs/editor/common/config/defaultConfig.ts +++ b/src/vs/editor/common/config/defaultConfig.ts @@ -89,7 +89,7 @@ class ConfigClass implements IConfiguration { folding: true, renderWhitespace: false, renderControlCharacters: false, - indentGuides: false, + renderIndentGuides: false, useTabStops: true, fontFamily: ( diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index 2e3ebae5806..d995b8952e5 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -425,7 +425,7 @@ export interface IEditorOptions { * Enable rendering of indent guides. * Defaults to true. */ - indentGuides?: boolean; + renderIndentGuides?: boolean; /** * Inserting and deleting whitespace follows tab stops. */ @@ -618,7 +618,7 @@ export class InternalEditorViewOptions { stopRenderingLineAfter: number; renderWhitespace: boolean; renderControlCharacters: boolean; - indentGuides: boolean; + renderIndentGuides: boolean; scrollbar:InternalEditorScrollbarOptions; /** @@ -644,7 +644,7 @@ export class InternalEditorViewOptions { stopRenderingLineAfter: number; renderWhitespace: boolean; renderControlCharacters: boolean; - indentGuides: boolean; + renderIndentGuides: boolean; scrollbar:InternalEditorScrollbarOptions; }) { this.theme = String(source.theme); @@ -666,7 +666,7 @@ export class InternalEditorViewOptions { this.stopRenderingLineAfter = source.stopRenderingLineAfter|0; this.renderWhitespace = Boolean(source.renderWhitespace); this.renderControlCharacters = Boolean(source.renderControlCharacters); - this.indentGuides = Boolean(source.indentGuides); + this.renderIndentGuides = Boolean(source.renderIndentGuides); this.scrollbar = source.scrollbar.clone(); } @@ -722,7 +722,7 @@ export class InternalEditorViewOptions { && this.stopRenderingLineAfter === other.stopRenderingLineAfter && this.renderWhitespace === other.renderWhitespace && this.renderControlCharacters === other.renderControlCharacters - && this.indentGuides === other.indentGuides + && this.renderIndentGuides === other.renderIndentGuides && this.scrollbar.equals(other.scrollbar) ); } @@ -751,7 +751,7 @@ export class InternalEditorViewOptions { stopRenderingLineAfter: this.stopRenderingLineAfter !== newOpts.stopRenderingLineAfter, renderWhitespace: this.renderWhitespace !== newOpts.renderWhitespace, renderControlCharacters: this.renderControlCharacters !== newOpts.renderControlCharacters, - indentGuides: this.indentGuides !== newOpts.indentGuides, + renderIndentGuides: this.renderIndentGuides !== newOpts.renderIndentGuides, scrollbar: (!this.scrollbar.equals(newOpts.scrollbar)), }; } @@ -784,7 +784,7 @@ export interface IViewConfigurationChangedEvent { stopRenderingLineAfter: boolean; renderWhitespace: boolean; renderControlCharacters: boolean; - indentGuides: boolean; + renderIndentGuides: boolean; scrollbar: boolean; } diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 0c97aa14ab7..75e7a0481b1 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -1277,7 +1277,7 @@ declare module monaco.editor { * Enable rendering of indent guides. * Defaults to true. */ - indentGuides?: boolean; + renderIndentGuides?: boolean; /** * Inserting and deleting whitespace follows tab stops. */ @@ -1369,7 +1369,7 @@ declare module monaco.editor { stopRenderingLineAfter: number; renderWhitespace: boolean; renderControlCharacters: boolean; - indentGuides: boolean; + renderIndentGuides: boolean; scrollbar: InternalEditorScrollbarOptions; } @@ -1393,7 +1393,7 @@ declare module monaco.editor { stopRenderingLineAfter: boolean; renderWhitespace: boolean; renderControlCharacters: boolean; - indentGuides: boolean; + renderIndentGuides: boolean; scrollbar: boolean; } -- GitLab