Round-trip the zwj unicode character

Rendering of sequences containing zwj is still not implemented, since it
can cause the collapse of an unbounded number of characters into a
single cell. However, kitty at least preserves the zwj by storing it as
a combining character.
This commit is contained in:
Kovid Goyal
2018-08-04 18:29:45 +05:30
parent e05d48a574
commit 094ddd9333
7 changed files with 170 additions and 142 deletions

10
kitty/wcwidth-std.h generated
View File

@@ -8,7 +8,7 @@ START_ALLOW_CASE_RANGE
static int
wcwidth_std(int32_t code) {
switch(code) {
// Marks (2239 codepoints) {{{
// Marks (2240 codepoints) {{{
case 0x0:
return 0;
case 0x300 ... 0x36f:
@@ -307,6 +307,8 @@ wcwidth_std(int32_t code) {
return 0;
case 0x1dfb ... 0x1dff:
return 0;
case 0x200d:
return 0;
case 0x20d0 ... 0x20f0:
return 0;
case 0x2cef ... 0x2cf1:
@@ -565,7 +567,7 @@ wcwidth_std(int32_t code) {
return 0;
// }}}
// Non-printing characters (2264 codepoints) {{{
// Non-printing characters (2263 codepoints) {{{
case 0x1 ... 0x1f:
return -1;
case 0x7f ... 0x9f:
@@ -584,7 +586,9 @@ wcwidth_std(int32_t code) {
return -1;
case 0x180e:
return -1;
case 0x200b ... 0x200f:
case 0x200b ... 0x200c:
return -1;
case 0x200e ... 0x200f:
return -1;
case 0x202a ... 0x202e:
return -1;