experimental angle improvement.

This commit is contained in:
Christopher Jeffrey 2015-05-01 21:59:09 -07:00
parent c435b03bdc
commit 245b3f44b1

View File

@ -1113,6 +1113,23 @@ Screen.prototype._getAngle = function(lines, x, y) {
angle |= 1 << 0;
}
// Experimental: fixes this situation:
// +----------+
// | <-- empty space here, should be a T angle
// +-------+ |
// | | |
// +-------+ |
// | |
// +----------+
// if (uangles[lines[y][x][1]]) {
// if (lines[y + 1] && cdangles[lines[y + 1][x][1]]) {
// if (!this.options.ignoreDockContrast) {
// if (lines[y + 1][x][0] !== attr) return ch;
// }
// angle |= 1 << 0;
// }
// }
return angleTable[angle] || ch;
};
@ -9132,6 +9149,10 @@ var dangles = {
'\u2502': true // '│'
};
var cdangles = {
'\u250c': true // '┌'
};
// Every ACS angle character can be
// represented by 4 bits ordered like this:
// [langle][uangle][rangle][dangle]