Skip to content

Commit cd9867e

Browse files
authored
Merge pull request #4443 from tisilent/#4441
Uniform cursor unfocused rendering. #4441
2 parents 21f48ba + e1d852c commit cd9867e

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

addons/xterm-addon-canvas/src/CursorRenderLayer.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,7 @@ export class CursorRenderLayer extends BaseRenderLayer {
149149
this._ctx.save();
150150
this._ctx.fillStyle = this._themeService.colors.cursor.css;
151151
const cursorStyle = this._optionsService.rawOptions.cursorStyle;
152-
if (cursorStyle && cursorStyle !== 'block') {
153-
this._cursorRenderers[cursorStyle](cursorX, viewportRelativeCursorY, this._cell);
154-
} else {
155-
this._renderBlurCursor(cursorX, viewportRelativeCursorY, this._cell);
156-
}
152+
this._renderBlurCursor(cursorX, viewportRelativeCursorY, this._cell);
157153
this._ctx.restore();
158154
this._state.x = cursorX;
159155
this._state.y = viewportRelativeCursorY;

addons/xterm-addon-webgl/src/renderLayer/CursorRenderLayer.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,7 @@ export class CursorRenderLayer extends BaseRenderLayer {
149149
this._ctx.save();
150150
this._ctx.fillStyle = this._themeService.colors.cursor.css;
151151
const cursorStyle = terminal.options.cursorStyle;
152-
if (cursorStyle && cursorStyle !== 'block') {
153-
this._cursorRenderers[cursorStyle](terminal, cursorX, viewportRelativeCursorY, this._cell);
154-
} else {
155-
this._renderBlurCursor(terminal, cursorX, viewportRelativeCursorY, this._cell);
156-
}
152+
this._renderBlurCursor(terminal, cursorX, viewportRelativeCursorY, this._cell);
157153
this._ctx.restore();
158154
this._state.x = cursorX;
159155
this._state.y = viewportRelativeCursorY;

src/browser/renderer/dom/DomRenderer.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,10 @@ export class DomRenderer extends Disposable implements IRenderer {
180180
`}`;
181181
// Cursor
182182
styles +=
183-
`${this._terminalSelector} .${ROW_CONTAINER_CLASS}:not(.${FOCUS_CLASS}) .${CURSOR_CLASS}.${CURSOR_STYLE_BLOCK_CLASS} {` +
183+
`${this._terminalSelector} .${ROW_CONTAINER_CLASS}:not(.${FOCUS_CLASS}) .${CURSOR_CLASS}.${CURSOR_STYLE_BLOCK_CLASS} ,` +
184+
`${this._terminalSelector} .${ROW_CONTAINER_CLASS}:not(.${FOCUS_CLASS}) .${CURSOR_CLASS}.${CURSOR_STYLE_BAR_CLASS} ,` +
185+
`${this._terminalSelector} .${ROW_CONTAINER_CLASS}:not(.${FOCUS_CLASS}) .${CURSOR_CLASS}.${CURSOR_STYLE_UNDERLINE_CLASS} ` +
186+
`{` +
184187
` outline: 1px solid ${colors.cursor.css};` +
185188
` outline-offset: -1px;` +
186189
`}` +

0 commit comments

Comments
 (0)