mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Check after updating the SelectionRenderModel
This commit is contained in:
@@ -1128,6 +1128,20 @@ export function injectSharedRendererTests(ctx: ISharedRendererTestContext): void
|
||||
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 1, 1), [0, 0, 0, 255]); // inverse foreground of '■' should be default
|
||||
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 2, 1), [0, 0, 255, 255]); // inverse background of ' ' should be decoration bg override
|
||||
});
|
||||
test('#4911 The selection should not be displayed if it is not within the scope of the viewport.', async () => {
|
||||
const theme: ITheme = {
|
||||
selectionBackground: '#FF0000'
|
||||
};
|
||||
await ctx.value.page.evaluate(`window.term.options.theme = ${JSON.stringify(theme)};`);
|
||||
for (let index = 0; index < 160; index++) {
|
||||
await ctx.value.proxy.writeln(``);
|
||||
}
|
||||
await ctx.value.proxy.scrollToBottom();
|
||||
const rows = await ctx.value.proxy.buffer.active.length;
|
||||
await ctx.value.proxy.selectLines(rows - 1, rows - 1);
|
||||
await ctx.value.proxy.scrollLines(-2);
|
||||
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 1, 1), [0, 0, 0, 255]);
|
||||
});
|
||||
});
|
||||
|
||||
test.describe('regression tests', () => {
|
||||
|
||||
Reference in New Issue
Block a user