Render known country flags designated by a pair of unicode codepoints in two cells instead of four.

This commit is contained in:
Kovid Goyal
2020-04-06 22:16:59 +05:30
parent 9bc2ab3245
commit 24197dc422
6 changed files with 56 additions and 10 deletions
+6 -3
View File
@@ -8,6 +8,11 @@ START_ALLOW_CASE_RANGE
static int
wcwidth_std(int32_t code) {
switch(code) {
// Flags (26 codepoints) {{{
case 0x1f1e6 ... 0x1f1ff:
return 2;
// }}}
// Marks (2302 codepoints) {{{
case 0x0:
return 0;
@@ -1494,9 +1499,7 @@ wcwidth_std(int32_t code) {
return 2;
// }}}
// Emoji Presentation (26 codepoints) {{{
case 0x1f1e6 ... 0x1f1ff:
return 2;
// Emoji Presentation (0 codepoints) {{{
// }}}
// Not assigned in the unicode character database (765365 codepoints) {{{