mirror of
https://github.com/embarklabs/neo-blessed.git
synced 2025-02-03 14:45:33 +00:00
minor
This commit is contained in:
parent
9020f645af
commit
48d7d73116
@ -1077,14 +1077,13 @@ Program.prototype.text = function(text, attr) {
|
|||||||
|
|
||||||
Program.prototype._attr = function(param, val) {
|
Program.prototype._attr = function(param, val) {
|
||||||
var self = this
|
var self = this
|
||||||
, parts = param.split(/\s*[,;]\s*/)
|
, parts = param.split(/\s*[,;]\s*/);
|
||||||
, out = '';
|
|
||||||
|
|
||||||
if (parts.length > 1) {
|
if (parts.length > 1) {
|
||||||
parts.forEach(function(part) {
|
parts = parts.map(function(part) {
|
||||||
out += self._attr(part, val);
|
return self._attr(part, val).slice(2, -1);
|
||||||
});
|
});
|
||||||
return out;
|
return '\x1b[' + parts.join(';') + 'm';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (param.indexOf('no ') === 0) {
|
if (param.indexOf('no ') === 0) {
|
||||||
@ -1267,10 +1266,9 @@ Program.prototype._attr = function(param, val) {
|
|||||||
|
|
||||||
// non-16-color rxvt default fg and bg
|
// non-16-color rxvt default fg and bg
|
||||||
case 'default fg bg':
|
case 'default fg bg':
|
||||||
if (this.term('rxvt')) {
|
return this.term('rxvt')
|
||||||
return '\x1b[100m';
|
? '\x1b[100m'
|
||||||
}
|
: '\x1b[39;49m';
|
||||||
return this._attr('default fg') + this._attr('default bg');
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// 256-color fg and bg
|
// 256-color fg and bg
|
||||||
@ -1737,7 +1735,7 @@ Program.prototype.normalBuffer = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Program.prototype.enableMouse = function() {
|
Program.prototype.enableMouse = function() {
|
||||||
if (this.term('urxvt')) {
|
if (this.term('rxvt')) {
|
||||||
return this.setMouse({ urxvtMouse: true });
|
return this.setMouse({ urxvtMouse: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user