always lowercase terminal name. debug messages for blessed-telnet.
This commit is contained in:
parent
524a922880
commit
f6a19a57e9
|
@ -25,6 +25,10 @@ var server = telnet.createServer(function(client) {
|
||||||
client.do.window_size();
|
client.do.window_size();
|
||||||
client.do.environment_variables();
|
client.do.environment_variables();
|
||||||
|
|
||||||
|
client.on('debug', function(msg) {
|
||||||
|
console.error(msg);
|
||||||
|
});
|
||||||
|
|
||||||
client.on('environment variables', function(data) {
|
client.on('environment variables', function(data) {
|
||||||
if (data.command === 'sb' && data.name === 'TERM') {
|
if (data.command === 'sb' && data.name === 'TERM') {
|
||||||
screen.terminal = data.value;
|
screen.terminal = data.value;
|
||||||
|
|
|
@ -71,6 +71,8 @@ function Program(options) {
|
||||||
|| process.env.TERM
|
|| process.env.TERM
|
||||||
|| (process.platform === 'win32' ? 'windows-ansi' : 'xterm');
|
|| (process.platform === 'win32' ? 'windows-ansi' : 'xterm');
|
||||||
|
|
||||||
|
this._terminal = this._terminal.toLowerCase();
|
||||||
|
|
||||||
// OSX
|
// OSX
|
||||||
this.isOSXTerm = process.env.TERM_PROGRAM === 'Apple_Terminal';
|
this.isOSXTerm = process.env.TERM_PROGRAM === 'Apple_Terminal';
|
||||||
this.isiTerm2 = process.env.TERM_PROGRAM === 'iTerm.app'
|
this.isiTerm2 = process.env.TERM_PROGRAM === 'iTerm.app'
|
||||||
|
@ -308,7 +310,7 @@ Program.prototype.__defineSetter__('terminal', function(terminal) {
|
||||||
});
|
});
|
||||||
|
|
||||||
Program.prototype.setTerminal = function(terminal) {
|
Program.prototype.setTerminal = function(terminal) {
|
||||||
this._terminal = terminal;
|
this._terminal = terminal.toLowerCase();
|
||||||
delete this._tputSetup;
|
delete this._tputSetup;
|
||||||
this.setupTput();
|
this.setupTput();
|
||||||
};
|
};
|
||||||
|
|
|
@ -46,6 +46,8 @@ function Tput(options) {
|
||||||
|| process.env.TERM
|
|| process.env.TERM
|
||||||
|| (process.platform === 'win32' ? 'windows-ansi' : 'xterm');
|
|| (process.platform === 'win32' ? 'windows-ansi' : 'xterm');
|
||||||
|
|
||||||
|
this.terminal = this.terminal.toLowerCase();
|
||||||
|
|
||||||
this.debug = options.debug;
|
this.debug = options.debug;
|
||||||
this.padding = options.padding;
|
this.padding = options.padding;
|
||||||
this.extended = options.extended;
|
this.extended = options.extended;
|
||||||
|
|
Loading…
Reference in New Issue