mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-22 05:33:45 -04:00
wip: grapheme shaping
This commit is contained in:
parent
c1cde66f70
commit
b9ef703eb1
16 changed files with 340 additions and 178 deletions
6
search.c
6
search.c
|
|
@ -249,7 +249,7 @@ matches_cell(const struct terminal *term, const struct cell *cell, size_t search
|
|||
base < (CELL_COMB_CHARS_LO + term->composed_count))
|
||||
{
|
||||
composed = &term->composed[base - CELL_COMB_CHARS_LO];
|
||||
base = composed->base;
|
||||
base = composed->chars[0];
|
||||
}
|
||||
|
||||
if (composed == NULL && base == 0 && term->search.buf[search_ofs] == L' ')
|
||||
|
|
@ -262,8 +262,8 @@ matches_cell(const struct terminal *term, const struct cell *cell, size_t search
|
|||
if (search_ofs + 1 + composed->count > term->search.len)
|
||||
return -1;
|
||||
|
||||
for (size_t j = 0; j < composed->count; j++) {
|
||||
if (composed->combining[j] != term->search.buf[search_ofs + 1 + j])
|
||||
for (size_t j = 1; j < composed->count; j++) {
|
||||
if (composed->chars[j] != term->search.buf[search_ofs + 1 + j])
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue