Remove Terminal.send
This commit is contained in:
+17
-17
@@ -40,7 +40,7 @@ class RequestTerminfo implements IDcsHandler {
|
||||
}
|
||||
unhook(): void {
|
||||
// invalid: DCS 0 + r Pt ST
|
||||
this._terminal.send(`${C0.ESC}P0+r${this._data}${C0.ESC}\\`);
|
||||
this._terminal.handler(`${C0.ESC}P0+r${this._data}${C0.ESC}\\`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,25 +68,25 @@ class DECRQSS implements IDcsHandler {
|
||||
switch (this._data) {
|
||||
// valid: DCS 1 $ r Pt ST (xterm)
|
||||
case '"q': // DECSCA
|
||||
return this._terminal.send(`${C0.ESC}P1$r0"q${C0.ESC}\\`);
|
||||
return this._terminal.handler(`${C0.ESC}P1$r0"q${C0.ESC}\\`);
|
||||
case '"p': // DECSCL
|
||||
return this._terminal.send(`${C0.ESC}P1$r61"p${C0.ESC}\\`);
|
||||
return this._terminal.handler(`${C0.ESC}P1$r61"p${C0.ESC}\\`);
|
||||
case 'r': // DECSTBM
|
||||
const pt = '' + (this._terminal.buffer.scrollTop + 1) +
|
||||
';' + (this._terminal.buffer.scrollBottom + 1) + 'r';
|
||||
return this._terminal.send(`${C0.ESC}P1$r${pt}${C0.ESC}\\`);
|
||||
return this._terminal.handler(`${C0.ESC}P1$r${pt}${C0.ESC}\\`);
|
||||
case 'm': // SGR
|
||||
// TODO: report real settings instead of 0m
|
||||
return this._terminal.send(`${C0.ESC}P1$r0m${C0.ESC}\\`);
|
||||
return this._terminal.handler(`${C0.ESC}P1$r0m${C0.ESC}\\`);
|
||||
case ' q': // DECSCUSR
|
||||
const STYLES: {[key: string]: number} = {'block': 2, 'underline': 4, 'bar': 6};
|
||||
let style = STYLES[this._terminal.getOption('cursorStyle')];
|
||||
style -= this._terminal.getOption('cursorBlink');
|
||||
return this._terminal.send(`${C0.ESC}P1$r${style} q${C0.ESC}\\`);
|
||||
return this._terminal.handler(`${C0.ESC}P1$r${style} q${C0.ESC}\\`);
|
||||
default:
|
||||
// invalid: DCS 0 $ r Pt ST (xterm)
|
||||
this._terminal.error('Unknown DCS $q %s', this._data);
|
||||
this._terminal.send(`${C0.ESC}P0$r${this._data}${C0.ESC}\\`);
|
||||
this._terminal.handler(`${C0.ESC}P0$r${this._data}${C0.ESC}\\`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1032,24 +1032,24 @@ export class InputHandler extends Disposable implements IInputHandler {
|
||||
|
||||
if (!collect) {
|
||||
if (this._terminal.is('xterm') || this._terminal.is('rxvt-unicode') || this._terminal.is('screen')) {
|
||||
this._terminal.send(C0.ESC + '[?1;2c');
|
||||
this._terminal.handler(C0.ESC + '[?1;2c');
|
||||
} else if (this._terminal.is('linux')) {
|
||||
this._terminal.send(C0.ESC + '[?6c');
|
||||
this._terminal.handler(C0.ESC + '[?6c');
|
||||
}
|
||||
} else if (collect === '>') {
|
||||
// xterm and urxvt
|
||||
// seem to spit this
|
||||
// out around ~370 times (?).
|
||||
if (this._terminal.is('xterm')) {
|
||||
this._terminal.send(C0.ESC + '[>0;276;0c');
|
||||
this._terminal.handler(C0.ESC + '[>0;276;0c');
|
||||
} else if (this._terminal.is('rxvt-unicode')) {
|
||||
this._terminal.send(C0.ESC + '[>85;95;0c');
|
||||
this._terminal.handler(C0.ESC + '[>85;95;0c');
|
||||
} else if (this._terminal.is('linux')) {
|
||||
// not supported by linux console.
|
||||
// linux console echoes parameters.
|
||||
this._terminal.send(params[0] + 'c');
|
||||
this._terminal.handler(params[0] + 'c');
|
||||
} else if (this._terminal.is('screen')) {
|
||||
this._terminal.send(C0.ESC + '[>83;40003;0c');
|
||||
this._terminal.handler(C0.ESC + '[>83;40003;0c');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1733,19 +1733,19 @@ export class InputHandler extends Disposable implements IInputHandler {
|
||||
break;
|
||||
case 15:
|
||||
// no printer
|
||||
// this.send(C0.ESC + '[?11n');
|
||||
// this.handler(C0.ESC + '[?11n');
|
||||
break;
|
||||
case 25:
|
||||
// dont support user defined keys
|
||||
// this.send(C0.ESC + '[?21n');
|
||||
// this.handler(C0.ESC + '[?21n');
|
||||
break;
|
||||
case 26:
|
||||
// north american keyboard
|
||||
// this.send(C0.ESC + '[?27;1;0;0n');
|
||||
// this.handler(C0.ESC + '[?27;1;0;0n');
|
||||
break;
|
||||
case 53:
|
||||
// no dec locator/mouse
|
||||
// this.send(C0.ESC + '[?50n');
|
||||
// this.handler(C0.ESC + '[?50n');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user