mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-27 01:40:16 -05:00
term: CELL_COMB_CHARS chars are keys, not indices -> more range is better
Bump the available key range to 30 bits. This helps reduce key collisions when handling a large amount of grapheme clusters.
This commit is contained in:
parent
f20956ff1b
commit
9a7c6bdcf2
1 changed files with 4 additions and 3 deletions
|
|
@ -51,9 +51,10 @@ struct attributes {
|
||||||
};
|
};
|
||||||
static_assert(sizeof(struct attributes) == 8, "VT attribute struct too large");
|
static_assert(sizeof(struct attributes) == 8, "VT attribute struct too large");
|
||||||
|
|
||||||
#define CELL_COMB_CHARS_LO 0x40000000ul
|
/* Last valid Unicode code point is 0x0010FFFFul */
|
||||||
#define CELL_COMB_CHARS_HI 0x400ffffful
|
#define CELL_COMB_CHARS_LO 0x00200000ul
|
||||||
#define CELL_SPACER 0x40100000ul
|
#define CELL_COMB_CHARS_HI (CELL_COMB_CHARS_LO + 0x3fffffff)
|
||||||
|
#define CELL_SPACER (CELL_COMB_CHARS_HI + 1)
|
||||||
|
|
||||||
struct cell {
|
struct cell {
|
||||||
wchar_t wc;
|
wchar_t wc;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue