diff --git a/src/renderer/compositions/terminal.ts b/src/renderer/compositions/terminal.ts index e523f5ca..82b1648c 100644 --- a/src/renderer/compositions/terminal.ts +++ b/src/renderer/compositions/terminal.ts @@ -444,6 +444,11 @@ export function handleTerminalMessages() { const tab = tabs.find(item => item.pid === data.pid) if (!tab) return tab.deferred.stop.resolve() + // FIXME: xterm-addon-webgl cannot dispose correctly + if (tab.addons.webgl) { + tab.addons.webgl.dispose() + delete tab.addons.webgl + } const xterm = tab.xterm xterm.dispose() removeTerminalTab(tab)