From c895f67fd8d21861f49be1df198437935b8c2831 Mon Sep 17 00:00:00 2001 From: Svante Boberg Date: Wed, 27 Jul 2022 00:00:41 +0200 Subject: [PATCH] Add missing webgl cursor blink disposal Same disposal code as the non-webgl cursor blink layer --- .../src/renderLayer/CursorRenderLayer.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/addons/xterm-addon-webgl/src/renderLayer/CursorRenderLayer.ts b/addons/xterm-addon-webgl/src/renderLayer/CursorRenderLayer.ts index c80b4c56..f7dcef28 100644 --- a/addons/xterm-addon-webgl/src/renderLayer/CursorRenderLayer.ts +++ b/addons/xterm-addon-webgl/src/renderLayer/CursorRenderLayer.ts @@ -54,6 +54,14 @@ export class CursorRenderLayer extends BaseRenderLayer { this.onOptionsChanged(terminal); } + public override dispose(): void { + if (this._cursorBlinkStateManager) { + this._cursorBlinkStateManager.dispose(); + this._cursorBlinkStateManager = undefined; + } + super.dispose(); + } + public resize(terminal: Terminal, dim: IRenderDimensions): void { super.resize(terminal, dim); // Resizing the canvas discards the contents of the canvas so clear state