mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Prevent crash on true color, add TODOs for it
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user