Skip to content

Commit

Permalink
fix webgl part of xtermjs#4480
Browse files Browse the repository at this point in the history
  • Loading branch information
jerch committed May 21, 2023
1 parent 7460782 commit f270127
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions addons/xterm-addon-webgl/src/WebglRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,16 @@ export class WebglRenderer extends Disposable implements IRenderer {
}

// Tell renderer the frame is beginning
// upon a model clear also refresh the full viewport model
// (also triggered by an atlas page merge, part of #4480)
if (this._glyphRenderer.beginFrame()) {
this._clearModel(true);
this._updateModel(0, this._terminal.rows - 1);
} else {
// just update changed lines to draw
this._updateModel(start, end);
}

// Update model to reflect what's drawn
this._updateModel(start, end);

// Render
this._rectangleRenderer?.render();
this._glyphRenderer?.render(this._model);
Expand Down

0 comments on commit f270127

Please sign in to comment.