Move bracketed paste mode to coreservice
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -61,6 +61,7 @@ export class MockCoreService implements ICoreService {
|
||||
public decPrivateModes: IDecPrivateModes = {
|
||||
applicationCursorKeys: false,
|
||||
applicationKeypad: false,
|
||||
bracketedPasteMode: false,
|
||||
origin: false,
|
||||
wraparound: true
|
||||
};
|
||||
|
||||
Vendored
+1
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user