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) {
+1
View File
@@ -61,6 +61,7 @@ export class MockCoreService implements ICoreService {
public decPrivateModes: IDecPrivateModes = {
applicationCursorKeys: false,
applicationKeypad: false,
bracketedPasteMode: false,
origin: false,
wraparound: true
};
+1
View File
@@ -163,6 +163,7 @@ export interface IMarker extends IDisposable {
export interface IDecPrivateModes {
applicationCursorKeys: boolean;
applicationKeypad: boolean;
bracketedPasteMode: boolean;
origin: boolean;
wraparound: boolean; // defaults: xterm - true, vt100 - false
}
+1
View File
@@ -11,6 +11,7 @@ import { clone } from 'common/Clone';
const DEFAULT_DEC_PRIVATE_MODES: IDecPrivateModes = Object.freeze({
applicationCursorKeys: false,
applicationKeypad: false,
bracketedPasteMode: false,
origin: false,
wraparound: true // defaults: xterm - true, vt100 - false
});