Add cursorInactiveStyle option
This commit is contained in:
@@ -461,7 +461,7 @@ export class WebglRenderer extends Disposable implements IRenderer {
|
||||
y: this._terminal.buffer.active.cursorY,
|
||||
width: cell.getWidth(),
|
||||
style: this._coreBrowserService.isFocused ?
|
||||
(terminal.options.cursorStyle || 'block') : 'blur',
|
||||
(terminal.options.cursorStyle || 'block') : this._getInactiveCursorStyle(terminal.options.cursorInactiveStyle),
|
||||
cursorWidth: terminal.options.cursorWidth,
|
||||
dpr: this._devicePixelRatio
|
||||
};
|
||||
@@ -600,6 +600,19 @@ export class WebglRenderer extends Disposable implements IRenderer {
|
||||
const cursorY = this._terminal.buffer.active.cursorY;
|
||||
this._onRequestRedraw.fire({ start: cursorY, end: cursorY });
|
||||
}
|
||||
|
||||
private _getInactiveCursorStyle(cursorInactiveStyle: 'outline' | 'line' | 'underline' | 'none'): string {
|
||||
if (cursorInactiveStyle === 'outline') {
|
||||
return 'blur';
|
||||
}
|
||||
if (cursorInactiveStyle === 'line') {
|
||||
return 'bar';
|
||||
}
|
||||
if (cursorInactiveStyle === 'underline'){
|
||||
return 'underline';
|
||||
}
|
||||
return 'block';
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Share impl with core
|
||||
|
||||
Reference in New Issue
Block a user