fix NO_PADDING detection.
This commit is contained in:
parent
0547509481
commit
216aaf1f48
|
@ -280,7 +280,7 @@ Program.prototype.setupTput = function() {
|
|||
return;
|
||||
}
|
||||
|
||||
if (options.padding) {
|
||||
if (tput.padding) {
|
||||
self.put[key] = function() {
|
||||
return tput._print(tput[key].apply(tput, arguments), write);
|
||||
};
|
||||
|
|
|
@ -702,6 +702,12 @@ Tput.prototype.inject = function(info) {
|
|||
|
||||
this.features = info.features;
|
||||
Object.keys(info.features).forEach(function(key) {
|
||||
if (key === 'padding') {
|
||||
if (!info.features.padding && self.options.padding !== true) {
|
||||
self.padding = false;
|
||||
}
|
||||
return;
|
||||
}
|
||||
self[key] = info.features[key];
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue