From a30d3ecbe8d6f05c4cd87171d565d3789efe5bae Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sat, 10 Aug 2013 15:48:27 -0500 Subject: [PATCH] switch back to old acs. --- lib/widget.js | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/lib/widget.js b/lib/widget.js index 3e017a1..2607d6b 100644 --- a/lib/widget.js +++ b/lib/widget.js @@ -1068,18 +1068,21 @@ Screen.prototype.draw = function(start, end) { // Maybe remove !this.tput.unicode check, however, // this seems to be the way ncurses does it. if (this.tput) { - 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) { + //if (!this.tput.brokenACS || !this.tput.unicode) { + 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 @@ -1089,10 +1092,9 @@ 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.strings.enter_alt_charset_mode - && this.tput.numbers.U8 !== 1)) - && ch > '~') { + // if (this.tput.numbers.U8 !== 1 && ch > '~') { + // if ((!this.unicode || this.tput.numbers.U8 !== 1) && this.tput.utoa[ch]) { + if (this.tput.numbers.U8 !== 1 && this.tput.utoa[ch]) { ch = this.tput.utoa[ch] || '?'; } }