Force a sync render after resize occurs

Fixes #4922
Related microsoft/vscode#230120
This commit is contained in:
Daniel Imms
2025-12-28 14:38:42 -08:00
parent b989c5a568
commit 4619a755b1
3 changed files with 18 additions and 4 deletions
+5 -1
View File
@@ -202,6 +202,9 @@ export class WebglRenderer extends Disposable implements IRenderer {
// Force a full refresh. Resizing `_glyphRenderer` should clear it already,
// so there is no need to clear it again here.
this._clearModel(false);
// Render synchronously to avoid flicker when the canvas is cleared
this._onRequestRedraw.fire({ start: 0, end: this._terminal.rows - 1, sync: true });
}
public handleCharSizeChanged(): void {
@@ -617,7 +620,8 @@ export class WebglRenderer extends Disposable implements IRenderer {
// the change as it's an exact multiple of the cell sizes.
this._canvas.width = width;
this._canvas.height = height;
this._requestRedrawViewport();
// Render synchronously to avoid flicker when the canvas is cleared
this._onRequestRedraw.fire({ start: 0, end: this._terminal.rows - 1, sync: true });
}
private _requestRedrawViewport(): void {