Speed up is_combining_char() in the common case

This commit is contained in:
Kovid Goyal
2020-08-06 17:45:40 +05:30
parent 5555a66638
commit a835b56a51
5 changed files with 13 additions and 7 deletions

3
kitty/unicode-data.c generated
View File

@@ -1,4 +1,4 @@
// unicode data, built from the unicode standard on: 2020-04-06
// unicode data, built from the unicode standard on: 2020-08-06
// see gen-wcwidth.py
#include "data-types.h"
@@ -8,6 +8,7 @@ START_ALLOW_CASE_RANGE
bool
is_combining_char(char_type code) {
// M category (marks) (2301 codepoints) {{{
if (LIKELY(code < 768)) return false;
switch(code) {
case 0x300 ... 0x36f:
return true;