mark acs as broken if the terminal uses the pc alt charset as acs.

This commit is contained in:
Christopher Jeffrey 2013-08-04 08:28:59 -05:00
parent c05beb3059
commit 4ad7d90c9d

View File

@ -1924,10 +1924,18 @@ Tput.prototype.detectBrokenACS = function(info) {
} }
// The linux console is just broken for some reason. // 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') { if (info.name === 'linux') {
return true; return true;
} }
// PC alternate charset
// if (acsc.indexOf('+\x10,\x11-\x18.\x190<39>`\x04a<34>f<EFBFBD>g<EFBFBD>h') === 0) {
if (this.detectPCRomSet(info)) {
return true;
}
// screen termcap is bugged? // screen termcap is bugged?
if (info.name.indexOf('screen') == 0 if (info.name.indexOf('screen') == 0
&& process.env.TERMCAP && process.env.TERMCAP
@ -1944,8 +1952,8 @@ Tput.prototype.detectBrokenACS = function(info) {
return false; return false;
}; };
// Apparently the Linux console does not support ACS, // If enter_pc_charset is the same as enter_alt_charset,
// but it does support the PC ROM character set. // the terminal does not support SCLD as ACS.
// See: ~/ncurses/ncurses/tinfo/lib_acs.c // See: ~/ncurses/ncurses/tinfo/lib_acs.c
Tput.prototype.detectPCRomSet = function(info) { Tput.prototype.detectPCRomSet = function(info) {
var s = info.strings; var s = info.strings;
@ -1975,8 +1983,11 @@ Tput.prototype.parseACS = function(info) {
data.acsc = {}; data.acsc = {};
data.acscr = {}; 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)) { if (this.detectPCRomSet(info)) {
; return data;
} }
// See: ~/ncurses/ncurses/tinfo/lib_acs.c: L208 // See: ~/ncurses/ncurses/tinfo/lib_acs.c: L208