提交 0928c965 编写于 作者: R Rob Lourens

Fix #66184 - nicer display for very long terminal setting

上级 fe70dbfd
......@@ -71,6 +71,8 @@ export class SettingsTreeNewExtensionsElement extends SettingsTreeElement {
}
export class SettingsTreeSettingElement extends SettingsTreeElement {
private static MAX_DESC_LINES = 20;
setting: ISetting;
private _displayCategory: string;
......@@ -164,7 +166,13 @@ export class SettingsTreeSettingElement extends SettingsTreeElement {
}
this.overriddenScopeList = overriddenScopeList;
if (this.setting.description.length > SettingsTreeSettingElement.MAX_DESC_LINES) {
const truncatedDescLines = this.setting.description.slice(0, SettingsTreeSettingElement.MAX_DESC_LINES);
truncatedDescLines.push('[...]');
this.description = truncatedDescLines.join('\n');
} else {
this.description = this.setting.description.join('\n');
}
if (this.setting.enum && (!this.setting.type || settingTypeEnumRenderable(this.setting.type))) {
this.valueType = SettingValueType.Enum;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册