mirror of
https://github.com/embarklabs/neo-blessed.git
synced 2025-02-23 16:18:07 +00:00
minor fixes.
This commit is contained in:
parent
1ad3c0dcb2
commit
3ff31cf0c1
@ -1621,11 +1621,11 @@ Screen.prototype.__defineSetter__('focused', function(el) {
|
||||
return this.focusPush(el);
|
||||
});
|
||||
|
||||
Screen.prototype.clearRegion = function(xi, xl, yi, yl) {
|
||||
return this.fillRegion(this.dattr, ' ', xi, xl, yi, yl);
|
||||
Screen.prototype.clearRegion = function(xi, xl, yi, yl, override) {
|
||||
return this.fillRegion(this.dattr, ' ', xi, xl, yi, yl, override);
|
||||
};
|
||||
|
||||
Screen.prototype.fillRegion = function(attr, ch, xi, xl, yi, yl) {
|
||||
Screen.prototype.fillRegion = function(attr, ch, xi, xl, yi, yl, override) {
|
||||
var lines = this.lines
|
||||
, cell
|
||||
, xx;
|
||||
@ -1635,7 +1635,7 @@ Screen.prototype.fillRegion = function(attr, ch, xi, xl, yi, yl) {
|
||||
for (xx = xi; xx < xl; xx++) {
|
||||
cell = lines[yi][xx];
|
||||
if (!cell) break;
|
||||
if (attr !== cell[0] || ch !== cell[1]) {
|
||||
if (override || attr !== cell[0] || ch !== cell[1]) {
|
||||
lines[yi][xx][0] = attr;
|
||||
lines[yi][xx][1] = ch;
|
||||
lines[yi].dirty = true;
|
||||
@ -2822,13 +2822,14 @@ Element.prototype.setBack = function() {
|
||||
return this.setIndex(0);
|
||||
};
|
||||
|
||||
Element.prototype.clearPos = function(get) {
|
||||
Element.prototype.clearPos = function(get, override) {
|
||||
if (this.detached) return;
|
||||
var lpos = this._getCoords(get);
|
||||
if (!lpos) return;
|
||||
this.screen.clearRegion(
|
||||
lpos.xi, lpos.xl,
|
||||
lpos.yi, lpos.yl);
|
||||
lpos.yi, lpos.yl,
|
||||
override);
|
||||
};
|
||||
|
||||
Element.prototype.setLabel = function(options) {
|
||||
@ -5207,6 +5208,10 @@ List.prototype.appendItem = function(item) {
|
||||
};
|
||||
});
|
||||
|
||||
if (this.style.transparent) {
|
||||
options.transparent = true;
|
||||
}
|
||||
|
||||
var item = new Box(options);
|
||||
|
||||
this.items.push(item);
|
||||
@ -8069,6 +8074,10 @@ Terminal.prototype.bootstrap = function() {
|
||||
self.term.resize(self.width - self.iwidth, self.height - self.iheight);
|
||||
});
|
||||
|
||||
if (this.handler) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.pty = require('pty.js').fork(this.shell, this.args, {
|
||||
name: 'xterm',
|
||||
cols: this.width - this.iwidth,
|
||||
|
Loading…
x
Reference in New Issue
Block a user