提交 d672ffad 编写于 作者: A Alex Dima

Rename minimap.renderText to minimap.renderCharacters (#20947)

上级 639558ef
...@@ -185,7 +185,7 @@ class InternalEditorOptionsHelper { ...@@ -185,7 +185,7 @@ class InternalEditorOptionsHelper {
scrollbarArrowSize: scrollbar.arrowSize, scrollbarArrowSize: scrollbar.arrowSize,
verticalScrollbarHasArrows: scrollbar.verticalHasArrows, verticalScrollbarHasArrows: scrollbar.verticalHasArrows,
minimap: minimap.enabled, minimap: minimap.enabled,
minimapRenderText: minimap.renderText, minimapRenderCharacters: minimap.renderCharacters,
pixelRatio: pixelRatio pixelRatio: pixelRatio
}); });
...@@ -373,7 +373,7 @@ class InternalEditorOptionsHelper { ...@@ -373,7 +373,7 @@ class InternalEditorOptionsHelper {
private static _sanitizeMinimapOpts(raw: editorCommon.IEditorMinimapOptions): editorCommon.InternalEditorMinimapOptions { private static _sanitizeMinimapOpts(raw: editorCommon.IEditorMinimapOptions): editorCommon.InternalEditorMinimapOptions {
return new editorCommon.InternalEditorMinimapOptions({ return new editorCommon.InternalEditorMinimapOptions({
enabled: toBooleanWithDefault(raw.enabled, false), enabled: toBooleanWithDefault(raw.enabled, false),
renderText: toBooleanWithDefault(raw.renderText, true), renderCharacters: toBooleanWithDefault(raw.renderCharacters, true),
}); });
} }
} }
...@@ -672,10 +672,10 @@ const editorConfiguration: IConfigurationNode = { ...@@ -672,10 +672,10 @@ const editorConfiguration: IConfigurationNode = {
'default': DefaultConfig.editor.minimap.enabled, 'default': DefaultConfig.editor.minimap.enabled,
'description': nls.localize('minimap.enabled', "Controls if the minimap is shown") 'description': nls.localize('minimap.enabled', "Controls if the minimap is shown")
}, },
'editor.minimap.renderText': { 'editor.minimap.renderCharacters': {
'type': 'boolean', 'type': 'boolean',
'default': DefaultConfig.editor.minimap.renderText, 'default': DefaultConfig.editor.minimap.renderCharacters,
'description': nls.localize('minimap.renderText', "Render the actual text on a line (as opposed to color blocks)") 'description': nls.localize('minimap.renderCharacters', "Render the actual characters on a line (as opposed to color blocks)")
}, },
'editor.wordWrap': { 'editor.wordWrap': {
'type': 'string', 'type': 'string',
......
...@@ -58,7 +58,7 @@ class ConfigClass implements IConfiguration { ...@@ -58,7 +58,7 @@ class ConfigClass implements IConfiguration {
}, },
minimap: { minimap: {
enabled: false, enabled: false,
renderText: true renderCharacters: true
}, },
fixedOverflowWidgets: false, fixedOverflowWidgets: false,
overviewRulerLanes: 2, overviewRulerLanes: 2,
......
...@@ -167,7 +167,7 @@ export interface IEditorMinimapOptions { ...@@ -167,7 +167,7 @@ export interface IEditorMinimapOptions {
* Render the actual text on a line (as opposed to color blocks). * Render the actual text on a line (as opposed to color blocks).
* Defaults to true. * Defaults to true.
*/ */
renderText?: boolean; renderCharacters?: boolean;
} }
/** /**
...@@ -647,17 +647,17 @@ export class InternalEditorMinimapOptions { ...@@ -647,17 +647,17 @@ export class InternalEditorMinimapOptions {
readonly _internalEditorMinimapOptionsBrand: void; readonly _internalEditorMinimapOptionsBrand: void;
readonly enabled: boolean; readonly enabled: boolean;
readonly renderText: boolean; readonly renderCharacters: boolean;
/** /**
* @internal * @internal
*/ */
constructor(source: { constructor(source: {
enabled: boolean; enabled: boolean;
renderText: boolean; renderCharacters: boolean;
}) { }) {
this.enabled = Boolean(source.enabled); this.enabled = Boolean(source.enabled);
this.renderText = Boolean(source.renderText); this.renderCharacters = Boolean(source.renderCharacters);
} }
/** /**
...@@ -666,7 +666,7 @@ export class InternalEditorMinimapOptions { ...@@ -666,7 +666,7 @@ export class InternalEditorMinimapOptions {
public equals(other: InternalEditorMinimapOptions): boolean { public equals(other: InternalEditorMinimapOptions): boolean {
return ( return (
this.enabled === other.enabled this.enabled === other.enabled
&& this.renderText === other.renderText && this.renderCharacters === other.renderCharacters
); );
} }
......
...@@ -28,7 +28,7 @@ export interface IEditorLayoutProviderOpts { ...@@ -28,7 +28,7 @@ export interface IEditorLayoutProviderOpts {
horizontalScrollbarHeight: number; horizontalScrollbarHeight: number;
minimap: boolean; minimap: boolean;
minimapRenderText: boolean; minimapRenderCharacters: boolean;
pixelRatio: number; pixelRatio: number;
} }
...@@ -49,7 +49,7 @@ export class EditorLayoutProvider { ...@@ -49,7 +49,7 @@ export class EditorLayoutProvider {
const scrollbarArrowSize = _opts.scrollbarArrowSize | 0; const scrollbarArrowSize = _opts.scrollbarArrowSize | 0;
const horizontalScrollbarHeight = _opts.horizontalScrollbarHeight | 0; const horizontalScrollbarHeight = _opts.horizontalScrollbarHeight | 0;
const minimap = Boolean(_opts.minimap); const minimap = Boolean(_opts.minimap);
const minimapRenderText = Boolean(_opts.minimapRenderText); const minimapRenderCharacters = Boolean(_opts.minimapRenderCharacters);
const pixelRatio = Number(_opts.pixelRatio); const pixelRatio = Number(_opts.pixelRatio);
let lineNumbersWidth = 0; let lineNumbersWidth = 0;
...@@ -80,10 +80,10 @@ export class EditorLayoutProvider { ...@@ -80,10 +80,10 @@ export class EditorLayoutProvider {
} else { } else {
let minimapCharWidth: number; let minimapCharWidth: number;
if (pixelRatio >= 2) { if (pixelRatio >= 2) {
renderMinimap = minimapRenderText ? RenderMinimap.Large : RenderMinimap.LargeBlocks; renderMinimap = minimapRenderCharacters ? RenderMinimap.Large : RenderMinimap.LargeBlocks;
minimapCharWidth = 2 / pixelRatio; minimapCharWidth = 2 / pixelRatio;
} else { } else {
renderMinimap = minimapRenderText ? RenderMinimap.Small : RenderMinimap.SmallBlocks; renderMinimap = minimapRenderCharacters ? RenderMinimap.Small : RenderMinimap.SmallBlocks;
minimapCharWidth = 1 / pixelRatio; minimapCharWidth = 1 / pixelRatio;
} }
......
...@@ -32,7 +32,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { ...@@ -32,7 +32,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => {
scrollbarArrowSize: 0, scrollbarArrowSize: 0,
verticalScrollbarHasArrows: false, verticalScrollbarHasArrows: false,
minimap: false, minimap: false,
minimapRenderText: true, minimapRenderCharacters: true,
pixelRatio: 1, pixelRatio: 1,
}, new EditorLayoutInfo({ }, new EditorLayoutInfo({
width: 1000, width: 1000,
...@@ -87,7 +87,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { ...@@ -87,7 +87,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => {
scrollbarArrowSize: 13, scrollbarArrowSize: 13,
verticalScrollbarHasArrows: true, verticalScrollbarHasArrows: true,
minimap: false, minimap: false,
minimapRenderText: true, minimapRenderCharacters: true,
pixelRatio: 1, pixelRatio: 1,
}, new EditorLayoutInfo({ }, new EditorLayoutInfo({
width: 1000, width: 1000,
...@@ -142,7 +142,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { ...@@ -142,7 +142,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => {
scrollbarArrowSize: 0, scrollbarArrowSize: 0,
verticalScrollbarHasArrows: false, verticalScrollbarHasArrows: false,
minimap: false, minimap: false,
minimapRenderText: true, minimapRenderCharacters: true,
pixelRatio: 1, pixelRatio: 1,
}, new EditorLayoutInfo({ }, new EditorLayoutInfo({
width: 900, width: 900,
...@@ -197,7 +197,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { ...@@ -197,7 +197,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => {
scrollbarArrowSize: 0, scrollbarArrowSize: 0,
verticalScrollbarHasArrows: false, verticalScrollbarHasArrows: false,
minimap: false, minimap: false,
minimapRenderText: true, minimapRenderCharacters: true,
pixelRatio: 1, pixelRatio: 1,
}, new EditorLayoutInfo({ }, new EditorLayoutInfo({
width: 900, width: 900,
...@@ -252,7 +252,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { ...@@ -252,7 +252,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => {
scrollbarArrowSize: 0, scrollbarArrowSize: 0,
verticalScrollbarHasArrows: false, verticalScrollbarHasArrows: false,
minimap: false, minimap: false,
minimapRenderText: true, minimapRenderCharacters: true,
pixelRatio: 1, pixelRatio: 1,
}, new EditorLayoutInfo({ }, new EditorLayoutInfo({
width: 900, width: 900,
...@@ -307,7 +307,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { ...@@ -307,7 +307,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => {
scrollbarArrowSize: 0, scrollbarArrowSize: 0,
verticalScrollbarHasArrows: false, verticalScrollbarHasArrows: false,
minimap: false, minimap: false,
minimapRenderText: true, minimapRenderCharacters: true,
pixelRatio: 1, pixelRatio: 1,
}, new EditorLayoutInfo({ }, new EditorLayoutInfo({
width: 900, width: 900,
...@@ -362,7 +362,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { ...@@ -362,7 +362,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => {
scrollbarArrowSize: 0, scrollbarArrowSize: 0,
verticalScrollbarHasArrows: false, verticalScrollbarHasArrows: false,
minimap: false, minimap: false,
minimapRenderText: true, minimapRenderCharacters: true,
pixelRatio: 1, pixelRatio: 1,
}, new EditorLayoutInfo({ }, new EditorLayoutInfo({
width: 900, width: 900,
...@@ -417,7 +417,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { ...@@ -417,7 +417,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => {
scrollbarArrowSize: 0, scrollbarArrowSize: 0,
verticalScrollbarHasArrows: false, verticalScrollbarHasArrows: false,
minimap: false, minimap: false,
minimapRenderText: true, minimapRenderCharacters: true,
pixelRatio: 1, pixelRatio: 1,
}, new EditorLayoutInfo({ }, new EditorLayoutInfo({
width: 900, width: 900,
...@@ -472,7 +472,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { ...@@ -472,7 +472,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => {
scrollbarArrowSize: 0, scrollbarArrowSize: 0,
verticalScrollbarHasArrows: false, verticalScrollbarHasArrows: false,
minimap: false, minimap: false,
minimapRenderText: true, minimapRenderCharacters: true,
pixelRatio: 1, pixelRatio: 1,
}, new EditorLayoutInfo({ }, new EditorLayoutInfo({
width: 900, width: 900,
...@@ -527,7 +527,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { ...@@ -527,7 +527,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => {
scrollbarArrowSize: 0, scrollbarArrowSize: 0,
verticalScrollbarHasArrows: false, verticalScrollbarHasArrows: false,
minimap: false, minimap: false,
minimapRenderText: true, minimapRenderCharacters: true,
pixelRatio: 1, pixelRatio: 1,
}, new EditorLayoutInfo({ }, new EditorLayoutInfo({
width: 900, width: 900,
...@@ -582,7 +582,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { ...@@ -582,7 +582,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => {
scrollbarArrowSize: 0, scrollbarArrowSize: 0,
verticalScrollbarHasArrows: false, verticalScrollbarHasArrows: false,
minimap: true, minimap: true,
minimapRenderText: true, minimapRenderCharacters: true,
pixelRatio: 1, pixelRatio: 1,
}, new EditorLayoutInfo({ }, new EditorLayoutInfo({
width: 1000, width: 1000,
...@@ -637,7 +637,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { ...@@ -637,7 +637,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => {
scrollbarArrowSize: 0, scrollbarArrowSize: 0,
verticalScrollbarHasArrows: false, verticalScrollbarHasArrows: false,
minimap: true, minimap: true,
minimapRenderText: true, minimapRenderCharacters: true,
pixelRatio: 2, pixelRatio: 2,
}, new EditorLayoutInfo({ }, new EditorLayoutInfo({
width: 1000, width: 1000,
...@@ -692,7 +692,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { ...@@ -692,7 +692,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => {
scrollbarArrowSize: 0, scrollbarArrowSize: 0,
verticalScrollbarHasArrows: false, verticalScrollbarHasArrows: false,
minimap: true, minimap: true,
minimapRenderText: true, minimapRenderCharacters: true,
pixelRatio: 4, pixelRatio: 4,
}, new EditorLayoutInfo({ }, new EditorLayoutInfo({
width: 1000, width: 1000,
......
...@@ -1089,7 +1089,7 @@ declare module monaco.editor { ...@@ -1089,7 +1089,7 @@ declare module monaco.editor {
* Render the actual text on a line (as opposed to color blocks). * Render the actual text on a line (as opposed to color blocks).
* Defaults to true. * Defaults to true.
*/ */
renderText?: boolean; renderCharacters?: boolean;
} }
/** /**
...@@ -1503,7 +1503,7 @@ declare module monaco.editor { ...@@ -1503,7 +1503,7 @@ declare module monaco.editor {
export class InternalEditorMinimapOptions { export class InternalEditorMinimapOptions {
readonly _internalEditorMinimapOptionsBrand: void; readonly _internalEditorMinimapOptionsBrand: void;
readonly enabled: boolean; readonly enabled: boolean;
readonly renderText: boolean; readonly renderCharacters: boolean;
} }
export class EditorWrappingInfo { export class EditorWrappingInfo {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册