Merge pull request #4786 from Tyriar/4773
Fix block cursor rendering in DOM renderer
This commit is contained in:
@@ -205,8 +205,8 @@ export class DomRenderer extends Disposable implements IRenderer {
|
|||||||
` animation: blink_block` + `_` + this._terminalClass + ` 1s step-end infinite;` +
|
` animation: blink_block` + `_` + this._terminalClass + ` 1s step-end infinite;` +
|
||||||
`}` +
|
`}` +
|
||||||
`${this._terminalSelector} .${ROW_CONTAINER_CLASS} .${RowCss.CURSOR_CLASS}.${RowCss.CURSOR_STYLE_BLOCK_CLASS} {` +
|
`${this._terminalSelector} .${ROW_CONTAINER_CLASS} .${RowCss.CURSOR_CLASS}.${RowCss.CURSOR_STYLE_BLOCK_CLASS} {` +
|
||||||
` background-color: ${colors.cursor.css};` +
|
` background-color: ${colors.cursor.css} !important;` +
|
||||||
` color: ${colors.cursorAccent.css};` +
|
` color: ${colors.cursorAccent.css} !important;` +
|
||||||
`}` +
|
`}` +
|
||||||
`${this._terminalSelector} .${ROW_CONTAINER_CLASS} .${RowCss.CURSOR_CLASS}.${RowCss.CURSOR_STYLE_OUTLINE_CLASS} {` +
|
`${this._terminalSelector} .${ROW_CONTAINER_CLASS} .${RowCss.CURSOR_CLASS}.${RowCss.CURSOR_STYLE_OUTLINE_CLASS} {` +
|
||||||
` outline: 1px solid ${colors.cursor.css};` +
|
` outline: 1px solid ${colors.cursor.css};` +
|
||||||
|
|||||||
@@ -1137,6 +1137,16 @@ export function injectSharedRendererTests(ctx: ISharedRendererTestContext): void
|
|||||||
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 2, 1), [255, 255, 255, 255]);
|
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 2, 1), [255, 255, 255, 255]);
|
||||||
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 3, 1), [102, 102, 102, 255]);
|
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 3, 1), [102, 102, 102, 255]);
|
||||||
});
|
});
|
||||||
|
test('#4773: block cursor should render when the cell is selected', async () => {
|
||||||
|
const theme: ITheme = {
|
||||||
|
cursor: '#0000FF',
|
||||||
|
selectionBackground: '#FF0000'
|
||||||
|
};
|
||||||
|
await ctx.value.page.evaluate(`window.term.options.theme = ${JSON.stringify(theme)};`);
|
||||||
|
await ctx.value.proxy.focus();
|
||||||
|
await ctx.value.proxy.selectAll();
|
||||||
|
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 1, 1), [0, 0, 255, 255]);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user