minor property rename.

This commit is contained in:
Christopher Jeffrey 2013-07-14 09:32:50 -05:00
parent 04b0adac56
commit 990fb0d796
2 changed files with 16 additions and 10 deletions

View File

@ -52,7 +52,10 @@ function Program(options) {
this.scrollTop = 0;
this.scrollBottom = this.rows - 1;
this.terminal = options.terminal || process.env.TERM || 'xterm';
this.terminal = options.term
|| options.terminal
|| process.env.TERM
|| 'xterm';
// if (!Program.global) {
// Program._write = process.stdout.write;

View File

@ -39,7 +39,10 @@ function Tput(options) {
}
this.options = options;
this.term = options.term || process.env.TERM;
this.terminal = options.term
|| options.terminal
|| process.env.TERM
|| 'xterm';
this.debug = options.debug;
this.padding = options.padding;
@ -74,20 +77,20 @@ function Tput(options) {
*/
Tput.prototype._useVt102C = function() {
this.term = 'vt102';
this.terminal = 'vt102';
this.termcap = true;
this.compileTermcap();
};
Tput.prototype._useXtermC = function() {
this.term = 'xterm';
this.terminal = 'xterm';
this.termcap = true;
this.termcapFile = __dirname + '/../usr/xterm.termcap';
this.compileTermcap();
};
Tput.prototype._useXtermI = function() {
this.term = 'xterm';
this.terminal = 'xterm';
this.termcap = false;
this.terminfoFile = __dirname + '/../usr/xterm';
this.compileTerminfo();
@ -120,8 +123,8 @@ Tput.prototype._terminfoPrefix = function(prefix) {
var file = path.resolve(
prefix,
path.basename(this.term[0]),
path.basename(this.term)
path.basename(this.terminal[0]),
path.basename(this.terminal)
);
try {
@ -1089,7 +1092,7 @@ Tput.prototype.readTermcap = function(data) {
|| Tput.termcap;
var terms = this.parseTermcap(data)
, root = terms[this.term];
, root = terms[this.terminal];
if (this.debug) {
this._termcap = terms;
@ -1318,12 +1321,12 @@ Tput.prototype.detectBrokenACS = function() {
}
// The linux console is just broken for some reason.
if (this.term === 'linux') {
if (this.terminal === 'linux') {
return true;
}
// screen termcap is bugged?
if (this.term.indexOf('screen') == 0
if (this.terminal.indexOf('screen') == 0
&& process.env.TERMCAP
&& ~process.env.TERMCAP.indexOf('screen')
&& ~process.env.TERMCAP.indexOf('hhII00')) {