jix joined cell representation as overloaded CellData type

This commit is contained in:
Jörg Breitbart
2019-04-30 00:58:18 +02:00
parent 3f145b8a0c
commit 4fd9b3f249
3 changed files with 54 additions and 12 deletions
+3 -2
View File
@@ -10,6 +10,7 @@ import BaseCharAtlas from './atlas/BaseCharAtlas';
import { acquireCharAtlas } from './atlas/CharAtlasCache';
import { CellData, AttributeData } from '../BufferLine';
import { WHITESPACE_CELL_CHAR, WHITESPACE_CELL_CODE } from '../Buffer';
import { JoinedCellData } from './CharacterJoinerRegistry';
export abstract class BaseRenderLayer implements IRenderLayer {
private _canvas: HTMLCanvasElement;
@@ -260,8 +261,8 @@ export abstract class BaseRenderLayer implements IRenderLayer {
*/
protected drawChars(terminal: ITerminal, cell: ICellData, x: number, y: number): void {
// skip cache right away if we draw in RGB
if (cell.isFgRGB() || cell.isBgRGB()) {
// skip cache right away if we draw in RGB or have joined cells
if (cell.isFgRGB() || cell.isBgRGB() || cell instanceof JoinedCellData) {
this._drawUncachedChars(terminal, cell, x, y);
return;
}