From 2a8371f5c6108fe1ec96597d4e1b7e1cfca349a1 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Tue, 29 Jun 2021 09:14:27 -0700 Subject: [PATCH] Remove terminal editor from service on editor close Fixes #127307 --- .../contrib/terminal/browser/terminalEditorService.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/terminal/browser/terminalEditorService.ts b/src/vs/workbench/contrib/terminal/browser/terminalEditorService.ts index 300797a5f9b86..fa22f41996248 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalEditorService.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalEditorService.ts @@ -64,9 +64,9 @@ export class TerminalEditorService extends Disposable implements ITerminalEditor } })); this._register(this.onDidDisposeInstance(instance => this.detachInstance(instance))); - this._register(this._editorService.onDidCloseEditor(editor => { - if (editor instanceof TerminalEditorInput && editor.terminalInstance) { - this.detachInstance(editor.terminalInstance); + this._register(this._editorService.onDidCloseEditor(e => { + if (e.editor instanceof TerminalEditorInput && e.editor.terminalInstance) { + this.detachInstance(e.editor.terminalInstance); } })); }