dispose of marker first (#151540)

* fix #151225

* better
This commit is contained in:
Megan Rogge 2022-06-08 10:10:28 -08:00 committed by GitHub
parent 6d91b80dd8
commit 601da405f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);