fix and test padding.

This commit is contained in:
Christopher Jeffrey 2013-02-24 08:13:25 -06:00
parent 6913cb9363
commit 59de26fcbe
2 changed files with 6 additions and 3 deletions

View File

@ -18,3 +18,8 @@ console.log('Max colors: %d.', tput.max_colors);
//tput.readTermcap();
//console.log(tput.termcap.terms);
//tput.padding = true;
//tput._parsePadding('hello$<1000/>world', console.log, function() {
// tput._parsePadding('$<1000*>foo$<1000/>bar', console.log, process.exit);
//});

View File

@ -798,9 +798,8 @@ Tput.prototype._parsePadding = function(code, print, done) {
return next();
}
part = part.substring(padding[0].cap);
part = part.substring(padding[0].length);
// From terminfo man page:
// A `*' indicates that the padding required is proportional to the number
// of lines affected by the operation, and the amount given is the
// per-affected-unit padding required. (In the case of insert character,
@ -811,7 +810,6 @@ Tput.prototype._parsePadding = function(code, print, done) {
;
}
// From terminfo man page:
// A `/' suffix indicates that the padding is mandatory and forces a
// delay of the given number of milliseconds even on devices for which xon
// is present to indicate flow control.