Support setting the layer of a decoration

Fixes #3778
This commit is contained in:
Daniel Imms
2022-05-12 10:51:11 -07:00
parent bc4158c9b8
commit 7b4423819e
10 changed files with 62 additions and 8 deletions
@@ -177,7 +177,11 @@ export class DomRendererRowFactory {
// been applied
let bgOverride: IColor | undefined;
let fgOverride: IColor | undefined;
let isTop = false;
for (const d of this._decorationService.getDecorationsAtCell(x, row)) {
if (d.options.layer !== 'top' && isTop) {
continue;
}
if (d.backgroundColorRGB) {
bgColorMode = Attributes.CM_RGB;
bg = d.backgroundColorRGB.rgba >> 8 & 0xFFFFFF;
@@ -188,6 +192,7 @@ export class DomRendererRowFactory {
fg = d.foregroundColorRGB.rgba >> 8 & 0xFFFFFF;
fgOverride = d.foregroundColorRGB;
}
isTop = d.options.layer === 'top';
}
// Foreground