mirror of
https://github.com/embarklabs/neo-blessed.git
synced 2025-01-09 18:45:51 +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) {
|
||||
var self = this
|
||||
, parts = param.split(/\s*[,;]\s*/)
|
||||
, out = '';
|
||||
, parts = param.split(/\s*[,;]\s*/);
|
||||
|
||||
if (parts.length > 1) {
|
||||
parts.forEach(function(part) {
|
||||
out += self._attr(part, val);
|
||||
parts = parts.map(function(part) {
|
||||
return self._attr(part, val).slice(2, -1);
|
||||
});
|
||||
return out;
|
||||
return '\x1b[' + parts.join(';') + 'm';
|
||||
}
|
||||
|
||||
if (param.indexOf('no ') === 0) {
|
||||
@ -1267,10 +1266,9 @@ Program.prototype._attr = function(param, val) {
|
||||
|
||||
// non-16-color rxvt default fg and bg
|
||||
case 'default fg bg':
|
||||
if (this.term('rxvt')) {
|
||||
return '\x1b[100m';
|
||||
}
|
||||
return this._attr('default fg') + this._attr('default bg');
|
||||
return this.term('rxvt')
|
||||
? '\x1b[100m'
|
||||
: '\x1b[39;49m';
|
||||
|
||||
default:
|
||||
// 256-color fg and bg
|
||||
@ -1737,7 +1735,7 @@ Program.prototype.normalBuffer = function() {
|
||||
};
|
||||
|
||||
Program.prototype.enableMouse = function() {
|
||||
if (this.term('urxvt')) {
|
||||
if (this.term('rxvt')) {
|
||||
return this.setMouse({ urxvtMouse: true });
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user