temporarily remove noAlt.

This commit is contained in:
Christopher Jeffrey 2015-03-19 04:13:44 -07:00
parent 63685f559a
commit cbcc7e6124
2 changed files with 2 additions and 54 deletions

View File

@ -456,22 +456,6 @@ Screen.prototype.__defineSetter__('title', function(title) {
});
Screen.prototype.enter = function() {
if (this.options.noAlt) {
if (this._entered) return;
this._entered = true;
var self = this;
this.program.saveReportedCursor();
this.program.hideCursor();
this.program.cup(0, 0);
this.program.csr(0, this.height - 1);
this.alloc();
var log = console.log;
console.log = function() {
self.leave();
return log.apply(console, arguments);
};
return;
}
if (this.program.isAlt) return;
this.program.alternateBuffer();
this.program.hideCursor();
@ -481,22 +465,6 @@ Screen.prototype.enter = function() {
};
Screen.prototype.leave = function() {
if (this.options.noAlt) {
if (this._left) return;
this._left = true;
if (this.program.scrollTop !== 0
|| this.program.scrollBottom !== this.rows - 1) {
this.program.csr(0, this.height - 1);
}
this.program.restoreReportedCursor();
this.program.nel();
this.program.showCursor();
if (this._listenedMouse) {
this.program.disableMouse();
}
this.program.flush();
return;
}
if (!this.program.isAlt) return;
if (this.program.scrollTop !== 0
|| this.program.scrollBottom !== this.rows - 1) {
@ -713,27 +681,6 @@ Screen.prototype.alloc = function() {
}
}
if (this.options.noAlt) {
var self = this;
var draw = self.draw;
this.draw = function() {};
return this.once('render', function() {
var top = -1;
self.forDescendants(function(el) {
if (!el.lpos) return;
if (top === -1 || el.lpos.yi < top) {
top = el.lpos.yi;
}
});
self.draw = draw;
if (top !== -1) {
top = self.program.rows - top;
self.program.output.write(Array(top + 1).join('\n'));
}
self.render();
});
}
this.program.clear();
};

View File

@ -16,7 +16,8 @@ var list = blessed.list({
width: '50%',
height: 'shrink',
//border: 'line',
bottom: 2,
top: 5,
//bottom: 2,
left: 0,
style: {
fg: 'blue',