diff options
author | Megan Rogge <merogge@microsoft.com> | 2022-06-08 21:10:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-08 21:10:28 +0300 |
commit | 601da405f502048ed6eb00d1332bc28b1b808f2a (patch) | |
tree | 4b99b66586b6d4e431303778d35a38b30a8e4ebd /src/vs | |
parent | 6d91b80dd8d385483383b7bafeb4f7c3fc3c420f (diff) |
dispose of marker first (#151540)
* fix #151225
* better
Diffstat (limited to 'src/vs')
-rw-r--r-- | src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.ts b/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.ts index 4caf924b497..cc3510f39dc 100644 --- a/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.ts +++ b/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.ts @@ -118,8 +118,11 @@ export class DecorationAddon extends Disposable implements ITerminalAddon { } public clearDecorations(): void { - this._placeholderDecoration?.dispose(); - this._placeholderDecoration?.marker.dispose(); + if (this._placeholderDecoration) { + this._placeholderDecoration.marker.dispose(); + this._placeholderDecoration.dispose(); + this._placeholderDecoration = undefined; + } for (const value of this._decorations.values()) { value.decoration.dispose(); dispose(value.disposables); |