mirror of
https://github.com/embarklabs/neo-blessed.git
synced 2025-01-09 10:42:02 +00:00
account for ena_acs. fix for tmux 2.0. see #137.
This commit is contained in:
parent
f0b7204af0
commit
c7252ea86f
12
lib/tput.js
12
lib/tput.js
@ -2041,18 +2041,6 @@ Tput.prototype.detectBrokenACS = function(info) {
|
|||||||
return !!+process.env.NCURSES_NO_UTF8_ACS;
|
return !!+process.env.NCURSES_NO_UTF8_ACS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.env.TMUX != null) {
|
|
||||||
try {
|
|
||||||
var tver = cp.execFileSync('tmux', ['-V'], { encoding: 'utf8' });
|
|
||||||
tver = +tver.split(' ')[1].split('.')[0];
|
|
||||||
} catch (e) {
|
|
||||||
;
|
|
||||||
}
|
|
||||||
if (tver == null || tver >= 2) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the terminal supports unicode, we don't need ACS.
|
// If the terminal supports unicode, we don't need ACS.
|
||||||
if (info.numbers['U8'] >= 0) {
|
if (info.numbers['U8'] >= 0) {
|
||||||
return !!info.numbers['U8'];
|
return !!info.numbers['U8'];
|
||||||
|
@ -247,6 +247,10 @@ Screen.prototype.enter = function() {
|
|||||||
this.program.csr(0, this.height - 1);
|
this.program.csr(0, this.height - 1);
|
||||||
this.program.hideCursor();
|
this.program.hideCursor();
|
||||||
this.program.cup(0, 0);
|
this.program.cup(0, 0);
|
||||||
|
// We need this for tmux now:
|
||||||
|
if (this.tput.strings.ena_acs) {
|
||||||
|
this.program._write(this.tput.enacs());
|
||||||
|
}
|
||||||
this.alloc();
|
this.alloc();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user