未验证 提交 db2093d7 编写于 作者: A Alexander Schmidt-Krulig 提交者: Alex Dima

Add entireDocument minimap option

上级 429fee57
......@@ -1995,6 +1995,10 @@ export interface IEditorMinimapOptions {
* Relative size of the font in the minimap. Defaults to 1.
*/
scale?: number;
/**
* Minimap covers entire document.
*/
entireDocument?: boolean;
}
export type EditorMinimapOptions = Readonly<Required<IEditorMinimapOptions>>;
......@@ -2009,6 +2013,7 @@ class EditorMinimap extends BaseEditorOption<EditorOption.minimap, EditorMinimap
renderCharacters: true,
maxColumn: 120,
scale: 1,
entireDocument: false,
};
super(
EditorOption.minimap, 'minimap', defaults,
......@@ -2047,6 +2052,11 @@ class EditorMinimap extends BaseEditorOption<EditorOption.minimap, EditorMinimap
default: defaults.maxColumn,
description: nls.localize('minimap.maxColumn', "Limit the width of the minimap to render at most a certain number of columns.")
},
'editor.minimap.entireDocument': {
type: 'boolean',
default: defaults.entireDocument,
description: nls.localize('minimap.entireDocument', "Show entire document in the minimap.")
},
}
);
}
......@@ -2063,6 +2073,7 @@ class EditorMinimap extends BaseEditorOption<EditorOption.minimap, EditorMinimap
renderCharacters: EditorBooleanOption.boolean(input.renderCharacters, this.defaultValue.renderCharacters),
scale: EditorIntOption.clampedInt(input.scale, 1, 1, 3),
maxColumn: EditorIntOption.clampedInt(input.maxColumn, this.defaultValue.maxColumn, 1, 10000),
entireDocument: EditorBooleanOption.boolean(input.entireDocument, this.defaultValue.entireDocument),
};
}
}
......
......@@ -3398,6 +3398,10 @@ declare namespace monaco.editor {
* Relative size of the font in the minimap. Defaults to 1.
*/
scale?: number;
/**
* Minimap covers entire document.
*/
entireDocument?: boolean;
}
export type EditorMinimapOptions = Readonly<Required<IEditorMinimapOptions>>;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册