Skip to content

Commit

Permalink
fix: webgl renderer disposing
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanSalt committed Sep 13, 2023
1 parent 5ad6954 commit 8949f53
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/renderer/compositions/terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8949f53

Please sign in to comment.