mirror of
https://github.com/embarklabs/neo-blessed.git
synced 2025-01-09 10:42:02 +00:00
inherit tput objects properties.
This commit is contained in:
parent
f7e8cde45e
commit
983dfa943e
@ -54,11 +54,10 @@ function Program(options) {
|
|||||||
|
|
||||||
Program.prototype.__proto__ = EventEmitter.prototype;
|
Program.prototype.__proto__ = EventEmitter.prototype;
|
||||||
|
|
||||||
Program.prototype.setupTput = function(is) {
|
Program.prototype.setupTput = function() {
|
||||||
var self = this
|
var self = this
|
||||||
, options = this.options;
|
, options = this.options
|
||||||
|
, write = this.write.bind(this);
|
||||||
var write = this.write.bind(this);
|
|
||||||
|
|
||||||
var tput = this.tput = new Tput({
|
var tput = this.tput = new Tput({
|
||||||
term: this.terminal,
|
term: this.terminal,
|
||||||
@ -76,6 +75,11 @@ Program.prototype.setupTput = function(is) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Object.keys(tput).forEach(function(key) {
|
||||||
|
if (self[key] != null) return;
|
||||||
|
self[key] = tput[key];
|
||||||
|
});
|
||||||
|
|
||||||
Object.keys(tput).forEach(function(key) {
|
Object.keys(tput).forEach(function(key) {
|
||||||
if (typeof tput[key] !== 'function') {
|
if (typeof tput[key] !== 'function') {
|
||||||
self.put[key] = tput[key];
|
self.put[key] = tput[key];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user