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.environment_variables();
|
||||
|
||||
client.on('debug', function(msg) {
|
||||
console.error(msg);
|
||||
});
|
||||
|
||||
client.on('environment variables', function(data) {
|
||||
if (data.command === 'sb' && data.name === 'TERM') {
|
||||
screen.terminal = data.value;
|
||||
|
|
|
@ -71,6 +71,8 @@ function Program(options) {
|
|||
|| process.env.TERM
|
||||
|| (process.platform === 'win32' ? 'windows-ansi' : 'xterm');
|
||||
|
||||
this._terminal = this._terminal.toLowerCase();
|
||||
|
||||
// OSX
|
||||
this.isOSXTerm = process.env.TERM_PROGRAM === 'Apple_Terminal';
|
||||
this.isiTerm2 = process.env.TERM_PROGRAM === 'iTerm.app'
|
||||
|
@ -308,7 +310,7 @@ Program.prototype.__defineSetter__('terminal', function(terminal) {
|
|||
});
|
||||
|
||||
Program.prototype.setTerminal = function(terminal) {
|
||||
this._terminal = terminal;
|
||||
this._terminal = terminal.toLowerCase();
|
||||
delete this._tputSetup;
|
||||
this.setupTput();
|
||||
};
|
||||
|
|
|
@ -46,6 +46,8 @@ function Tput(options) {
|
|||
|| process.env.TERM
|
||||
|| (process.platform === 'win32' ? 'windows-ansi' : 'xterm');
|
||||
|
||||
this.terminal = this.terminal.toLowerCase();
|
||||
|
||||
this.debug = options.debug;
|
||||
this.padding = options.padding;
|
||||
this.extended = options.extended;
|
||||
|
|
Loading…
Reference in New Issue