Uniform cursor unfocused rendering. #4441
This commit is contained in:
@@ -149,11 +149,7 @@ export class CursorRenderLayer extends BaseRenderLayer {
|
|||||||
this._ctx.save();
|
this._ctx.save();
|
||||||
this._ctx.fillStyle = this._themeService.colors.cursor.css;
|
this._ctx.fillStyle = this._themeService.colors.cursor.css;
|
||||||
const cursorStyle = this._optionsService.rawOptions.cursorStyle;
|
const cursorStyle = this._optionsService.rawOptions.cursorStyle;
|
||||||
if (cursorStyle && cursorStyle !== 'block') {
|
this._renderBlurCursor(cursorX, viewportRelativeCursorY, this._cell);
|
||||||
this._cursorRenderers[cursorStyle](cursorX, viewportRelativeCursorY, this._cell);
|
|
||||||
} else {
|
|
||||||
this._renderBlurCursor(cursorX, viewportRelativeCursorY, this._cell);
|
|
||||||
}
|
|
||||||
this._ctx.restore();
|
this._ctx.restore();
|
||||||
this._state.x = cursorX;
|
this._state.x = cursorX;
|
||||||
this._state.y = viewportRelativeCursorY;
|
this._state.y = viewportRelativeCursorY;
|
||||||
|
|||||||
@@ -149,11 +149,7 @@ export class CursorRenderLayer extends BaseRenderLayer {
|
|||||||
this._ctx.save();
|
this._ctx.save();
|
||||||
this._ctx.fillStyle = this._themeService.colors.cursor.css;
|
this._ctx.fillStyle = this._themeService.colors.cursor.css;
|
||||||
const cursorStyle = terminal.options.cursorStyle;
|
const cursorStyle = terminal.options.cursorStyle;
|
||||||
if (cursorStyle && cursorStyle !== 'block') {
|
this._renderBlurCursor(terminal, cursorX, viewportRelativeCursorY, this._cell);
|
||||||
this._cursorRenderers[cursorStyle](terminal, cursorX, viewportRelativeCursorY, this._cell);
|
|
||||||
} else {
|
|
||||||
this._renderBlurCursor(terminal, cursorX, viewportRelativeCursorY, this._cell);
|
|
||||||
}
|
|
||||||
this._ctx.restore();
|
this._ctx.restore();
|
||||||
this._state.x = cursorX;
|
this._state.x = cursorX;
|
||||||
this._state.y = viewportRelativeCursorY;
|
this._state.y = viewportRelativeCursorY;
|
||||||
|
|||||||
@@ -184,6 +184,16 @@ export class DomRenderer extends Disposable implements IRenderer {
|
|||||||
` outline: 1px solid ${colors.cursor.css};` +
|
` outline: 1px solid ${colors.cursor.css};` +
|
||||||
` outline-offset: -1px;` +
|
` outline-offset: -1px;` +
|
||||||
`}` +
|
`}` +
|
||||||
|
`${this._terminalSelector} .${ROW_CONTAINER_CLASS}:not(.${FOCUS_CLASS}) .${CURSOR_CLASS}.${CURSOR_STYLE_BAR_CLASS} {` +
|
||||||
|
` outline: 1px solid ${colors.cursor.css};` +
|
||||||
|
` outline-offset: -1px;` +
|
||||||
|
` width: ${this.dimensions.css.cell.width}px` +
|
||||||
|
`}` +
|
||||||
|
`${this._terminalSelector} .${ROW_CONTAINER_CLASS}:not(.${FOCUS_CLASS}) .${CURSOR_CLASS}.${CURSOR_STYLE_UNDERLINE_CLASS} {` +
|
||||||
|
` outline: 1px solid ${colors.cursor.css};` +
|
||||||
|
` outline-offset: -1px;` +
|
||||||
|
` width: ${this.dimensions.css.cell.width}px` +
|
||||||
|
`}` +
|
||||||
`${this._terminalSelector} .${ROW_CONTAINER_CLASS}.${FOCUS_CLASS} .${CURSOR_CLASS}.${CURSOR_BLINK_CLASS}:not(.${CURSOR_STYLE_BLOCK_CLASS}) {` +
|
`${this._terminalSelector} .${ROW_CONTAINER_CLASS}.${FOCUS_CLASS} .${CURSOR_CLASS}.${CURSOR_BLINK_CLASS}:not(.${CURSOR_STYLE_BLOCK_CLASS}) {` +
|
||||||
` animation: blink_box_shadow` + `_` + this._terminalClass + ` 1s step-end infinite;` +
|
` animation: blink_box_shadow` + `_` + this._terminalClass + ` 1s step-end infinite;` +
|
||||||
`}` +
|
`}` +
|
||||||
|
|||||||
Reference in New Issue
Block a user