提交 afc57a08 编写于 作者: B Bura Chuhadar

87456: Configuration to increase the terminal cursor width

上级 79052bb8
......@@ -206,6 +206,11 @@ configurationRegistry.registerConfiguration({
enum: [TerminalCursorStyle.BLOCK, TerminalCursorStyle.LINE, TerminalCursorStyle.UNDERLINE],
default: TerminalCursorStyle.BLOCK
},
'terminal.integrated.cursorBarWidth': {
description: nls.localize('terminal.integrated.cursorBarWidth', "Controls the width of terminal bar cursor."),
type: 'number',
default: 1
},
'terminal.integrated.scrollback': {
description: nls.localize('terminal.integrated.scrollback', "Controls the maximum amount of lines the terminal keeps in its buffer."),
type: 'number',
......
......@@ -1227,6 +1227,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
const config = this._configHelper.config;
this._setCursorBlink(config.cursorBlinking);
this._setCursorStyle(config.cursorStyle);
this._setCursorBarWidth(config.cursorBarWidth);
this._setCommandsToSkipShell(config.commandsToSkipShell);
this._setEnableBell(config.enableBell);
this._safeSetOption('scrollback', config.scrollback);
......@@ -1269,6 +1270,14 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
}
}
private _setCursorBarWidth(width: number): void {
console.log('option', width);
if (this._xterm && this._xterm.getOption('cursorWidth') !== width) {
console.log('set option', width);
this._xterm.setOption('cursorWidth', width);
}
}
private _setCommandsToSkipShell(commands: string[]): void {
const excludeCommands = commands.filter(command => command[0] === '-').map(command => command.slice(1));
this._skipTerminalCommands = DEFAULT_COMMANDS_TO_SKIP_SHELL.filter(defaultCommand => {
......
......@@ -91,6 +91,7 @@ export interface ITerminalConfiguration {
rightClickBehavior: 'default' | 'copyPaste' | 'paste' | 'selectWord';
cursorBlinking: boolean;
cursorStyle: string;
cursorBarWidth: number;
drawBoldTextInBrightColors: boolean;
fastScrollSensitivity: number;
fontFamily: string;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册