@@ -402,6 +402,7 @@ export class WebglRenderer extends Disposable implements IRenderer {
|
|||||||
// override logic throughout the different sub-renderers
|
// override logic throughout the different sub-renderers
|
||||||
let bgOverride: number | undefined;
|
let bgOverride: number | undefined;
|
||||||
let fgOverride: number | undefined;
|
let fgOverride: number | undefined;
|
||||||
|
let isSelected: boolean = false;
|
||||||
|
|
||||||
// Apply decorations on the bottom layer
|
// Apply decorations on the bottom layer
|
||||||
for (const d of this._decorationService.getDecorationsAtCell(x, y, 'bottom')) {
|
for (const d of this._decorationService.getDecorationsAtCell(x, y, 'bottom')) {
|
||||||
@@ -414,7 +415,8 @@ export class WebglRenderer extends Disposable implements IRenderer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Apply the selection color if needed
|
// Apply the selection color if needed
|
||||||
if (this._isCellSelected(x, y)) {
|
isSelected = this._isCellSelected(x, y);
|
||||||
|
if (isSelected) {
|
||||||
bgOverride = (this._coreBrowserService.isFocused ? this._colors.selectionBackgroundOpaque : this._colors.selectionInactiveBackgroundOpaque).rgba >> 8 & 0xFFFFFF;
|
bgOverride = (this._coreBrowserService.isFocused ? this._colors.selectionBackgroundOpaque : this._colors.selectionInactiveBackgroundOpaque).rgba >> 8 & 0xFFFFFF;
|
||||||
if (this._colors.selectionForeground) {
|
if (this._colors.selectionForeground) {
|
||||||
fgOverride = this._colors.selectionForeground.rgba >> 8 & 0xFFFFFF;
|
fgOverride = this._colors.selectionForeground.rgba >> 8 & 0xFFFFFF;
|
||||||
@@ -434,8 +436,13 @@ export class WebglRenderer extends Disposable implements IRenderer {
|
|||||||
// Convert any overrides from rgba to the fg/bg packed format. This resolves the inverse flag
|
// Convert any overrides from rgba to the fg/bg packed format. This resolves the inverse flag
|
||||||
// ahead of time in order to use the correct cache key
|
// ahead of time in order to use the correct cache key
|
||||||
if (bgOverride !== undefined) {
|
if (bgOverride !== undefined) {
|
||||||
// Non-RGB attributes from model + override + force RGB color mode
|
if (isSelected) {
|
||||||
bgOverride = (this._workCell.bg & ~Attributes.RGB_MASK) | bgOverride | Attributes.CM_RGB;
|
// Non-RGB attributes from model + force non-dim + override + force RGB color mode
|
||||||
|
bgOverride = (this._workCell.bg & ~Attributes.RGB_MASK & ~BgFlags.DIM) | bgOverride | Attributes.CM_RGB;
|
||||||
|
} else {
|
||||||
|
// Non-RGB attributes from model + override + force RGB color mode
|
||||||
|
bgOverride = (this._workCell.bg & ~Attributes.RGB_MASK) | bgOverride | Attributes.CM_RGB;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (fgOverride !== undefined) {
|
if (fgOverride !== undefined) {
|
||||||
// Non-RGB attributes from model + force disable inverse + override + force RGB color mode
|
// Non-RGB attributes from model + force disable inverse + override + force RGB color mode
|
||||||
|
|||||||
Reference in New Issue
Block a user