Move bracketed paste mode to coreservice

This commit is contained in:
Daniel Imms
2020-04-25 11:11:05 -07:00
parent b80c14639e
commit 4cec11be9c
8 changed files with 30 additions and 20 deletions
+16 -1
View File
@@ -50,7 +50,7 @@ export abstract class CoreTerminal extends Disposable {
public readonly unicodeService: IUnicodeService;
public readonly optionsService: IOptionsService;
protected _windowsMode: IDisposable | undefined;
private _windowsMode: IDisposable | undefined;
private _onBinary = new EventEmitter<string>();
public get onBinary(): IEvent<string> { return this._onBinary.event; }
@@ -93,6 +93,21 @@ export abstract class CoreTerminal extends Disposable {
this.optionsService.onOptionChange(key => this._updateOptions(key));
}
public dispose(): void {
if (this._isDisposed) {
return;
}
super.dispose();
this._windowsMode?.dispose();
this._windowsMode = undefined;
}
protected _setup(): void {
if (this.optionsService.options.windowsMode) {
this._enableWindowsMode();
}
}
protected _updateOptions(key: string): void {
// TODO: These listeners should be owned by individual components
switch (key) {