mirror of
https://github.com/embarklabs/neo-blessed.git
synced 2025-01-09 10:42:02 +00:00
stop double-width chars from breaking words when wrapped.
This commit is contained in:
parent
edf22cd6cd
commit
758eef133c
@ -2424,7 +2424,7 @@ Element.prototype.parseContent = function(noTags) {
|
|||||||
if (this.screen.fullUnicode) {
|
if (this.screen.fullUnicode) {
|
||||||
// double-width chars will eat the next char after render. create a
|
// double-width chars will eat the next char after render. create a
|
||||||
// blank character after it so it doesn't eat the real next char.
|
// blank character after it so it doesn't eat the real next char.
|
||||||
content = content.replace(unicode.wideChars, '$1 ');
|
content = content.replace(unicode.wideChars, '$1_');
|
||||||
} else {
|
} else {
|
||||||
// no double-width: replace them with question-marks.
|
// no double-width: replace them with question-marks.
|
||||||
content = content.replace(unicode.wideChars, '??');
|
content = content.replace(unicode.wideChars, '??');
|
||||||
|
@ -24,11 +24,11 @@ var JUAN = '鹃';
|
|||||||
// ? String.fromCodePoint(0x675c)
|
// ? String.fromCodePoint(0x675c)
|
||||||
// : String.fromCharCode(0x675c);
|
// : String.fromCharCode(0x675c);
|
||||||
|
|
||||||
// var DOUBLE = DU;
|
var DOUBLE = DU;
|
||||||
// var DOUBLE = String.fromCodePoint(0x1F250);
|
// var DOUBLE = String.fromCodePoint(0x1F250);
|
||||||
|
|
||||||
// one flew over the 杜鹃's nest.
|
// one flew over the 杜鹃's nest.
|
||||||
var DOUBLE = DU + JUAN;
|
// var DOUBLE = DU + JUAN;
|
||||||
|
|
||||||
// var SURROGATE_DOUBLE = '𰀀';
|
// var SURROGATE_DOUBLE = '𰀀';
|
||||||
var SURROGATE_DOUBLE = String.fromCodePoint
|
var SURROGATE_DOUBLE = String.fromCodePoint
|
||||||
|
Loading…
x
Reference in New Issue
Block a user