mirror of
https://github.com/embarklabs/neo-blessed.git
synced 2025-02-23 08:08:16 +00:00
minor property rename.
This commit is contained in:
parent
04b0adac56
commit
990fb0d796
@ -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;
|
||||
|
21
lib/tput.js
21
lib/tput.js
@ -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')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user