This commit is contained in:
Christopher Jeffrey 2013-02-27 12:17:15 -06:00
parent ea85c1778f
commit f7e8cde45e
2 changed files with 6 additions and 5 deletions

View File

@ -1401,7 +1401,7 @@ Program.prototype._attr = function(param, val) {
return this._attr('default ' + m[2]); return this._attr('default ' + m[2]);
} }
if (color < 16) { if (color < 16 || this.tput.colors <= 16) {
if (m[2] === 'fg') { if (m[2] === 'fg') {
if (color < 8) { if (color < 8) {
color += 30; color += 30;

View File

@ -89,7 +89,7 @@ Tput.prototype.parseTerminfo = function(data) {
+ h.strCount * 2 + h.strCount * 2
+ h.strTableSize; + h.strTableSize;
i = h.headerSize; i += h.headerSize;
// Names Section // Names Section
var names = data.toString('ascii', i, i + h.namesSize - 1) var names = data.toString('ascii', i, i + h.namesSize - 1)
@ -258,7 +258,7 @@ Tput.prototype.parseExtended = function(data) {
+ h.strCount * 2 + h.strCount * 2
+ h.strTableSize; + h.strTableSize;
i = h.headerSize; i += h.headerSize;
// Booleans Section // Booleans Section
// One byte for each flag // One byte for each flag
@ -1001,8 +1001,9 @@ Tput.prototype.parseTermcap = function(data) {
desc: names.pop() desc: names.pop()
}; };
k = names.length; for (k = 0; k < names.length; k++) {
while (k--) terms[names[k]] = term; terms[names[k]] = term;
}
term.bools = {}; term.bools = {};
term.numbers = {}; term.numbers = {};