mirror of
https://github.com/Microsoft/vscode
synced 2024-11-05 18:29:38 +00:00
Hook up contribution dispose
This commit is contained in:
parent
62df9971f5
commit
b2be676a6b
2 changed files with 7 additions and 1 deletions
|
@ -595,6 +595,11 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
|
|||
contribution.xtermReady?.(xterm);
|
||||
}
|
||||
});
|
||||
this.onDisposed(() => {
|
||||
for (const contribution of this._contributions) {
|
||||
contribution.dispose();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import { TerminalCommandId } from 'vs/workbench/contrib/terminal/common/terminal
|
|||
import { TerminalContextKeys } from 'vs/workbench/contrib/terminal/common/terminalContextKey';
|
||||
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
|
||||
import { terminalStrings } from 'vs/workbench/contrib/terminal/common/terminalStrings';
|
||||
import { DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { DisposableStore, toDisposable } from 'vs/base/common/lifecycle';
|
||||
import { registerTerminalContribution } from 'vs/workbench/contrib/terminal/browser/terminalCommon';
|
||||
|
||||
registerSingleton(ITerminalLinkResolverService, TerminalLinkResolverService, InstantiationType.Delayed);
|
||||
|
@ -24,6 +24,7 @@ class TerminalLinkContribution extends DisposableStore implements ITerminalContr
|
|||
constructor(instance: ITerminalInstance) {
|
||||
super();
|
||||
console.log('ctor');
|
||||
this.add(toDisposable(() => console.log('dispose')));
|
||||
}
|
||||
xtermReady(xterm: IXtermTerminal): void {
|
||||
console.log('xtermReady');
|
||||
|
|
Loading…
Reference in a new issue