aboutsummaryrefslogtreecommitdiff
path: root/search.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-08-20 17:25:35 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-06-24 15:30:45 +0000
commitb9ef703eb14ba2357b847b62a715b4e97f690209 (patch)
treec6e65e05499e292a4f51d09453f44d1bdf0f93ad /search.c
parentMerge branch 'sixel-heap-user-after-free-after-blending' (diff)
wip: grapheme shaping
Diffstat (limited to 'search.c')
-rw-r--r--search.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/search.c b/search.c
index 9fc1ab2a..859608f5 100644
--- a/search.c
+++ b/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;
}
}