Blend cursorAccent with background too

Fixes #5241
This commit is contained in:
Daniel Imms
2024-12-20 08:51:17 -08:00
parent b74ec267e2
commit 3e998387fe
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -1256,6 +1256,16 @@ export function injectSharedRendererTests(ctx: ISharedRendererTestContext): void
await ctx.value.proxy.focus();
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 1, 1), [128, 0, 0, 255]);
});
test.only('#5241 cursorAccent with alpha should blend color with background color', async () => {
const theme: ITheme = {
cursorAccent: '#FF000080'
};
await ctx.value.page.evaluate(`window.term.options.theme = ${JSON.stringify(theme)};`);
await ctx.value.proxy.focus();
await ctx.value.proxy.write('■');
await ctx.value.proxy.write('\x1b[1D');
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 1, 1), [128, 0, 0, 255]);
});
});
}