From 1bdba0dad04b410be7d2671ad2e4de398047eed2 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Tue, 18 Mar 2014 01:26:16 -0500 Subject: [PATCH] potentially fix acs handling again: utf8 fallback on brokenACS. --- lib/widget.js | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/lib/widget.js b/lib/widget.js index a2ed4e1..5d99e45 100644 --- a/lib/widget.js +++ b/lib/widget.js @@ -1064,21 +1064,18 @@ 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) { - //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; + 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; } + } else if (acs) { + ch = this.tput.rmacs() + ch; + acs = false; } } else { // U8 is not consistently correct. Some terminfo's