提交 1f0ecfa7 编写于 作者: D Daniel Imms

Add terminal option drawBoldTextInBrightColors

Fixes #50895
上级 beaa6dc7
......@@ -68,6 +68,7 @@ export interface ITerminalConfiguration {
rightClickBehavior: 'default' | 'copyPaste' | 'selectWord';
cursorBlinking: boolean;
cursorStyle: string;
drawBoldTextInBrightColors: boolean;
fontFamily: string;
fontWeight: FontWeight;
fontWeightBold: FontWeight;
......
......@@ -125,6 +125,11 @@ configurationRegistry.registerConfiguration({
'type': 'boolean',
'default': false
},
'terminal.integrated.drawBoldTextInBrightColors': {
'description': nls.localize('terminal.integrated.drawBoldTextInBrightColors', "When set, bold text in the terminal will always use the \"bright\" ANSI color variant."),
'type': 'boolean',
'default': true
},
'terminal.integrated.fontFamily': {
'description': nls.localize('terminal.integrated.fontFamily', "Controls the font family of the terminal, this defaults to editor.fontFamily's value."),
'type': 'string'
......
......@@ -260,6 +260,7 @@ export class TerminalInstance implements ITerminalInstance {
this._xterm = new Terminal({
scrollback: config.scrollback,
theme: this._getXtermTheme(),
drawBoldTextInBrightColors: config.drawBoldTextInBrightColors,
fontFamily: font.fontFamily,
fontWeight: config.fontWeight,
fontWeightBold: config.fontWeightBold,
......@@ -836,13 +837,14 @@ export class TerminalInstance implements ITerminalInstance {
}
public updateConfig(): void {
this._setCursorBlink(this._configHelper.config.cursorBlinking);
this._setCursorStyle(this._configHelper.config.cursorStyle);
this._setCommandsToSkipShell(this._configHelper.config.commandsToSkipShell);
this._setScrollback(this._configHelper.config.scrollback);
this._setEnableBell(this._configHelper.config.enableBell);
this._setMacOptionIsMeta(this._configHelper.config.macOptionIsMeta);
this._setRightClickSelectsWord(this._configHelper.config.rightClickBehavior === 'selectWord');
const config = this._configHelper.config;
this._setCursorBlink(config.cursorBlinking);
this._setCursorStyle(config.cursorStyle);
this._setCommandsToSkipShell(config.commandsToSkipShell);
this._setScrollback(config.scrollback);
this._setEnableBell(config.enableBell);
this._setMacOptionIsMeta(config.macOptionIsMeta);
this._setRightClickSelectsWord(config.rightClickBehavior === 'selectWord');
}
public updateAccessibilitySupport(): void {
......@@ -935,6 +937,10 @@ export class TerminalInstance implements ITerminalInstance {
if (this._xterm.getOption('fontWeightBold') !== this._configHelper.config.fontWeightBold) {
this._xterm.setOption('fontWeightBold', this._configHelper.config.fontWeightBold);
}
if (this._xterm.getOption('drawBoldTextInBrightColors') !== this._configHelper.config.drawBoldTextInBrightColors) {
console.log('set', this._configHelper.config.drawBoldTextInBrightColors);
this._xterm.setOption('drawBoldTextInBrightColors', this._configHelper.config.drawBoldTextInBrightColors);
}
}
this._xterm.resize(this._cols, this._rows);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册