wip: grapheme shaping

This commit is contained in:
Daniel Eklöf 2020-08-20 19:25:35 +02:00
parent c1cde66f70
commit b9ef703eb1
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
16 changed files with 340 additions and 178 deletions

View file

@ -249,7 +249,7 @@ selection_find_word_boundary_left(struct terminal *term, struct coord *pos,
if (c >= CELL_COMB_CHARS_LO &&
c < (CELL_COMB_CHARS_LO + term->composed_count))
{
c = term->composed[c - CELL_COMB_CHARS_LO].base;
c = term->composed[c - CELL_COMB_CHARS_LO].chars[0];
}
bool initial_is_space = c == 0 || iswspace(c);
@ -289,7 +289,7 @@ selection_find_word_boundary_left(struct terminal *term, struct coord *pos,
if (c >= CELL_COMB_CHARS_LO &&
c < (CELL_COMB_CHARS_LO + term->composed_count))
{
c = term->composed[c - CELL_COMB_CHARS_LO].base;
c = term->composed[c - CELL_COMB_CHARS_LO].chars[0];
}
bool is_space = c == 0 || iswspace(c);
@ -328,7 +328,7 @@ selection_find_word_boundary_right(struct terminal *term, struct coord *pos,
if (c >= CELL_COMB_CHARS_LO &&
c < (CELL_COMB_CHARS_LO + term->composed_count))
{
c = term->composed[c - CELL_COMB_CHARS_LO].base;
c = term->composed[c - CELL_COMB_CHARS_LO].chars[0];
}
bool initial_is_space = c == 0 || iswspace(c);
@ -370,7 +370,7 @@ selection_find_word_boundary_right(struct terminal *term, struct coord *pos,
if (c >= CELL_COMB_CHARS_LO &&
c < (CELL_COMB_CHARS_LO + term->composed_count))
{
c = term->composed[c - CELL_COMB_CHARS_LO].base;
c = term->composed[c - CELL_COMB_CHARS_LO].chars[0];
}
bool is_space = c == 0 || iswspace(c);