fix ACS for TERM=linux again. fix listbar .style.
This commit is contained in:
parent
02176938c9
commit
0881128a4f
|
@ -1080,18 +1080,21 @@ Screen.prototype.draw = function(start, end) {
|
|||
// supports UTF8, but I imagine it's unlikely.
|
||||
// Maybe remove !this.tput.unicode check, however,
|
||||
// this seems to be the way ncurses does it.
|
||||
if (this.tput.strings.enter_alt_charset_mode && !this.tput.brokenACS) {
|
||||
if (this.tput.acscr[ch]) {
|
||||
if (acs) {
|
||||
ch = this.tput.acscr[ch];
|
||||
} else {
|
||||
ch = this.tput.smacs()
|
||||
+ this.tput.acscr[ch];
|
||||
acs = true;
|
||||
// if (this.tput.strings.enter_alt_charset_mode && !this.tput.brokenACS) {
|
||||
if (this.tput.strings.enter_alt_charset_mode) {
|
||||
if (!this.tput.brokenACS) {
|
||||
if (this.tput.acscr[ch]) {
|
||||
if (acs) {
|
||||
ch = this.tput.acscr[ch];
|
||||
} else {
|
||||
ch = this.tput.smacs()
|
||||
+ this.tput.acscr[ch];
|
||||
acs = true;
|
||||
}
|
||||
} else if (acs) {
|
||||
ch = this.tput.rmacs() + ch;
|
||||
acs = false;
|
||||
}
|
||||
} else if (acs) {
|
||||
ch = this.tput.rmacs() + ch;
|
||||
acs = false;
|
||||
}
|
||||
} else {
|
||||
// U8 is not consistently correct. Some terminfo's
|
||||
|
@ -6052,6 +6055,14 @@ function Listbar(options) {
|
|||
|
||||
Box.call(this, options);
|
||||
|
||||
if (!this.style.selected) {
|
||||
this.style.selected = {};
|
||||
}
|
||||
|
||||
if (!this.style.item) {
|
||||
this.style.item = {};
|
||||
}
|
||||
|
||||
if (options.commands || options.items) {
|
||||
this.setItems(options.commands || options.items);
|
||||
}
|
||||
|
@ -6081,7 +6092,6 @@ function Listbar(options) {
|
|||
self.emit('action', self.items[self.selected], self.selected);
|
||||
self.emit('select', self.items[self.selected], self.selected);
|
||||
var item = self.items[self.selected];
|
||||
//item.press();
|
||||
if (item._.cmd.callback) {
|
||||
item._.cmd.callback();
|
||||
}
|
||||
|
@ -6235,7 +6245,6 @@ Listbar.prototype.appendItem = function(item, callback) {
|
|||
});
|
||||
|
||||
var el = new Box(options);
|
||||
//var el = new Button(options);
|
||||
|
||||
this._[cmd.text] = el;
|
||||
cmd.element = el;
|
||||
|
|
Loading…
Reference in New Issue