add references to termcap data for all term names.
This commit is contained in:
parent
26440e76e1
commit
fe0e82f046
10
lib/tput.js
10
lib/tput.js
|
@ -791,7 +791,8 @@ Tput.prototype.parseTermcap = function(data) {
|
|||
, field
|
||||
, names
|
||||
, i
|
||||
, j;
|
||||
, j
|
||||
, k;
|
||||
|
||||
// remove escaped newlines
|
||||
data = data.replace(/\\\n[ \t]*/g, '');
|
||||
|
@ -810,14 +811,19 @@ Tput.prototype.parseTermcap = function(data) {
|
|||
|
||||
if (j === 0) {
|
||||
names = field.split('|');
|
||||
term = terms[names[0]] = {
|
||||
term = {
|
||||
name: names[0],
|
||||
names: names,
|
||||
desc: names.pop()
|
||||
};
|
||||
|
||||
k = names.length;
|
||||
while (k--) terms[names[k]] = term;
|
||||
|
||||
term.bools = {};
|
||||
term.numbers = {};
|
||||
term.strings = {};
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue