the ACS is finally correct.

This commit is contained in:
Christopher Jeffrey 2015-01-29 21:53:06 -08:00
parent 547812928e
commit 0386f8b5d6
1 changed files with 12 additions and 16 deletions

View File

@ -1080,9 +1080,7 @@ 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.strings.enter_alt_charset_mode) {
if (!this.tput.brokenACS) {
if (this.tput.strings.enter_alt_charset_mode && !this.tput.brokenACS) {
if (this.tput.acscr[ch]) {
if (acs) {
ch = this.tput.acscr[ch];
@ -1095,7 +1093,6 @@ Screen.prototype.draw = function(start, end) {
ch = this.tput.rmacs() + ch;
acs = false;
}
}
} else {
// U8 is not consistently correct. Some terminfo's
// terminals that do not declare it may actually
@ -1104,8 +1101,7 @@ Screen.prototype.draw = function(start, end) {
// are it does not support UTF8. This is probably
// the "safest" way to do this. Should fix things
// like sun-color.
// if ((!this.unicode || this.tput.numbers.U8 !== 1) && ch > '~') {
if ((!this.unicode || this.tput.numbers.U8 !== 1) && this.tput.utoa[ch]) {
if ((!this.tput.unicode || this.tput.numbers.U8 !== 1) && ch > '~') {
ch = this.tput.utoa[ch] || '?';
}
}