Generate a wcwidth for Go as well

This commit is contained in:
Kovid Goyal
2022-08-24 16:01:54 +05:30
parent 7bb310d3af
commit 05d768d8df
5 changed files with 3258 additions and 24 deletions

7
kitty/wcwidth-std.h generated
View File

@@ -7,7 +7,7 @@ START_ALLOW_CASE_RANGE
static inline int
wcwidth_std(int32_t code) {
if (LIKELY(0x20 <= code && code <= 0x7e)) return 1;
if (LIKELY(0x20 <= code && code <= 0x7e)) { return 1; }
switch(code) {
// Flags (26 codepoints) {{{
case 0x1f1e6 ... 0x1f1ff:
@@ -2932,7 +2932,8 @@ wcwidth_std(int32_t code) {
return -4;
// }}}
default: return 1;
default:
return 1;
}
return 1;
}
@@ -3247,7 +3248,7 @@ is_emoji_presentation_base(uint32_t code) {
return true;
default: return false;
}
return 1;
return true;
}
END_ALLOW_CASE_RANGE