mirror of
https://github.com/embarklabs/neo-blessed.git
synced 2025-02-27 10:00:46 +00:00
mark acs as broken if the terminal uses the pc alt charset as acs.
This commit is contained in:
parent
c05beb3059
commit
4ad7d90c9d
17
lib/tput.js
17
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<39>`\x04a<34>f<EFBFBD>g<EFBFBD>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
|
||||
|
Loading…
x
Reference in New Issue
Block a user