Prevent crash on true color, add TODOs for it

This commit is contained in:
Daniel Imms
2019-06-15 16:40:45 -07:00
parent 1ebae41a8b
commit 7148358acf
2 changed files with 8 additions and 0 deletions
@@ -275,7 +275,11 @@ export class RectangleRenderer {
if (bg === INVERTED_DEFAULT_COLOR) {
color = this._colors.foreground;
} else if (is256Color(bg)) {
// TODO: Need to do a separate set for 16 color palette?
color = this._colors.ansi[bg];
} else {
// TODO: Add support for true color
color = this._colors.foreground;
}
if (vertices.attributes.length < offset + 4) {
vertices.attributes = expandFloat32Array(vertices.attributes, this._terminal.rows * this._terminal.cols * INDICES_PER_RECTANGLE);
@@ -170,8 +170,10 @@ export class WebglCharAtlas extends BaseCharAtlas {
} else if (bg === INVERTED_DEFAULT_COLOR) {
return this._config.colors.foreground;
} else if (is256Color(bg)) {
// TODO: Need to do a separate set for 16 color palette?
return this._getColorFromAnsiIndex(bg);
}
// TODO: Support true color
return this._config.colors.background;
}
@@ -179,8 +181,10 @@ export class WebglCharAtlas extends BaseCharAtlas {
if (fg === INVERTED_DEFAULT_COLOR) {
return this._config.colors.background;
} else if (is256Color(fg)) {
// TODO: Need to do a separate set for 16 color palette?
return this._getColorFromAnsiIndex(fg);
}
// TODO: Support true color
return this._config.colors.foreground;
}