@xterm/addon-webgl 0.20.0-beta.279 → 0.20.0-beta.280

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xterm/addon-webgl",
3
- "version": "0.20.0-beta.279",
3
+ "version": "0.20.0-beta.280",
4
4
  "author": {
5
5
  "name": "The xterm.js authors",
6
6
  "url": "https://xtermjs.org/"
@@ -23,8 +23,8 @@
23
23
  "prepublishOnly": "npm run package",
24
24
  "start": "node ../../demo/start"
25
25
  },
26
- "commit": "f33f502267455f40e64a89a6a554b8d6beae6284",
26
+ "commit": "2fe3fd13a164f956d0c6a2365fa89feaf4366074",
27
27
  "peerDependencies": {
28
- "@xterm/xterm": "^6.1.0-beta.280"
28
+ "@xterm/xterm": "^6.1.0-beta.281"
29
29
  }
30
30
  }
@@ -456,7 +456,18 @@ export class WebglRenderer extends Disposable implements IRenderer {
456
456
 
457
457
  for (y = start; y <= end; y++) {
458
458
  row = y + terminal.buffer.ydisp;
459
- line = terminal.buffer.lines.get(row)!;
459
+ const bufferLine = terminal.buffer.lines.get(row);
460
+ if (!bufferLine) {
461
+ this._model.lineLengths[y] = 0;
462
+ for (x = 0; x < terminal.cols; x++) {
463
+ j = ((y * terminal.cols) + x) * RenderModelConstants.INDICIES_PER_CELL;
464
+ modelUpdated = true;
465
+ this._nullModelCell(x, y, j, 0, 0, 0);
466
+ }
467
+ this._setRowBlinkState(y, false);
468
+ continue;
469
+ }
470
+ line = bufferLine;
460
471
  let rowHasBlinkingCells = false;
461
472
  this._model.lineLengths[y] = 0;
462
473
  isCursorRow = cursorY === row;
@@ -587,13 +598,9 @@ export class WebglRenderer extends Disposable implements IRenderer {
587
598
  // Null out non-first cells
588
599
  for (x++; x <= lastCharX; x++) {
589
600
  j = ((y * terminal.cols) + x) * RenderModelConstants.INDICIES_PER_CELL;
590
- this._glyphRenderer.value!.updateCell(x, y, NULL_CELL_CODE, 0, 0, 0, NULL_CELL_CHAR, 0, 0);
591
- this._model.cells[j] = NULL_CELL_CODE;
592
601
  // Don't re-resolve the cell color since multi-colored ligature backgrounds are not
593
602
  // supported
594
- this._model.cells[j + RenderModelConstants.BG_OFFSET] = this._cellColorResolver.result.bg;
595
- this._model.cells[j + RenderModelConstants.FG_OFFSET] = this._cellColorResolver.result.fg;
596
- this._model.cells[j + RenderModelConstants.EXT_OFFSET] = this._cellColorResolver.result.ext;
603
+ this._nullModelCell(x, y, j, this._cellColorResolver.result.bg, this._cellColorResolver.result.fg, this._cellColorResolver.result.ext);
597
604
  }
598
605
  x--; // Go back to the previous update cell for next iteration
599
606
  }
@@ -607,6 +614,14 @@ export class WebglRenderer extends Disposable implements IRenderer {
607
614
  this._updateTextBlinkState();
608
615
  }
609
616
 
617
+ private _nullModelCell(x: number, y: number, cellIndex: number, bg: number, fg: number, ext: number): void {
618
+ this._glyphRenderer.value!.updateCell(x, y, NULL_CELL_CODE, bg, fg, ext, NULL_CELL_CHAR, 0, 0);
619
+ this._model.cells[cellIndex] = NULL_CELL_CODE;
620
+ this._model.cells[cellIndex + RenderModelConstants.BG_OFFSET] = bg;
621
+ this._model.cells[cellIndex + RenderModelConstants.FG_OFFSET] = fg;
622
+ this._model.cells[cellIndex + RenderModelConstants.EXT_OFFSET] = ext;
623
+ }
624
+
610
625
  private _resetBlinkingRowState(): void {
611
626
  this._rowHasBlinkingCells = new Array(this._terminal.rows).fill(false);
612
627
  this._rowHasBlinkingCellsCount = 0;