diff --git a/lib/tput.js b/lib/tput.js index 6b44f0c..aab01fb 100644 --- a/lib/tput.js +++ b/lib/tput.js @@ -1924,10 +1924,18 @@ Tput.prototype.detectBrokenACS = function(info) { } // The linux console is just broken for some reason. + // Apparently the Linux console does not support ACS, + // but it does support the PC ROM character set. if (info.name === 'linux') { return true; } + // PC alternate charset + // if (acsc.indexOf('+\x10,\x11-\x18.\x190�`\x04a�f�g�h') === 0) { + if (this.detectPCRomSet(info)) { + return true; + } + // screen termcap is bugged? if (info.name.indexOf('screen') == 0 && process.env.TERMCAP @@ -1944,8 +1952,8 @@ Tput.prototype.detectBrokenACS = function(info) { return false; }; -// Apparently the Linux console does not support ACS, -// but it does support the PC ROM character set. +// If enter_pc_charset is the same as enter_alt_charset, +// the terminal does not support SCLD as ACS. // See: ~/ncurses/ncurses/tinfo/lib_acs.c Tput.prototype.detectPCRomSet = function(info) { var s = info.strings; @@ -1975,8 +1983,11 @@ Tput.prototype.parseACS = function(info) { data.acsc = {}; data.acscr = {}; + // Possibly just return an empty object, as done here, instead of + // specifically saying ACS is "broken" above. This would be more + // accurate to ncurses logic. But it doesn't really matter. if (this.detectPCRomSet(info)) { - ; + return data; } // See: ~/ncurses/ncurses/tinfo/lib_acs.c: L208