Fix feedback

This commit is contained in:
Daniel Imms
2019-04-01 00:01:41 -07:00
parent 69f8700557
commit 5c8c680dac
11 changed files with 98 additions and 94 deletions
+5 -5
View File
@@ -106,7 +106,7 @@ class DECRQSS implements IDcsHandler {
export class InputHandler extends Disposable implements IInputHandler {
private _parseBuffer: Uint32Array = new Uint32Array(4096);
private _stringDecoder: StringToUtf32 = new StringToUtf32();
private _cell: CellData = new CellData();
private _workCell: CellData = new CellData();
constructor(
protected _terminal: IInputHandlingTerminal,
@@ -351,7 +351,7 @@ export class InputHandler extends Disposable implements IInputHandler {
// since they always follow a cell consuming char
// therefore we can test for buffer.x to avoid overflow left
if (!chWidth && buffer.x) {
if (!bufferRow.loadCell(buffer.x - 1, this._cell).getWidth()) {
if (!bufferRow.getWidth(buffer.x - 1)) {
// found empty cell after fullwidth, need to go 2 cells back
// it is save to step 2 cells back here
// since an empty cell is only set by fullwidth chars
@@ -400,7 +400,7 @@ export class InputHandler extends Disposable implements IInputHandler {
// test last cell - since the last cell has only room for
// a halfwidth char any fullwidth shifted there is lost
// and will be set to empty cell
if (bufferRow.loadCell(cols - 1, this._cell).getWidth() === 2) {
if (bufferRow.getWidth(cols - 1) === 2) {
bufferRow.setCellFromCodePoint(cols - 1, NULL_CELL_CODE, NULL_CELL_WIDTH, curAttr, 0);
}
}
@@ -970,10 +970,10 @@ export class InputHandler extends Disposable implements IInputHandler {
// make buffer local for faster access
const buffer = this._terminal.buffer;
const line = buffer.lines.get(buffer.ybase + buffer.y);
line.loadCell(buffer.x - 1, this._cell);
line.loadCell(buffer.x - 1, this._workCell);
line.replaceCells(buffer.x,
buffer.x + (params[0] || 1),
(this._cell.content !== undefined) ? this._cell : buffer.getNullCell(DEFAULT_ATTR)
(this._workCell.content !== undefined) ? this._workCell : buffer.getNullCell(DEFAULT_ATTR)
);
// FIXME: no updateRange here?
}