mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-27 01:40:16 -05:00
Merge branch 'search-extend-to-word-boundary-handle-composed-chars'
This commit is contained in:
commit
0d4dc7e44b
1 changed files with 13 additions and 0 deletions
13
search.c
13
search.c
|
|
@ -473,6 +473,14 @@ search_match_to_end_of_word(struct terminal *term, bool spaces_only)
|
||||||
if (wc == CELL_MULT_COL_SPACER)
|
if (wc == CELL_MULT_COL_SPACER)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
const struct composed *composed = NULL;
|
||||||
|
if (wc >= CELL_COMB_CHARS_LO &&
|
||||||
|
wc < (CELL_COMB_CHARS_LO + term->composed_count))
|
||||||
|
{
|
||||||
|
composed = &term->composed[wc - CELL_COMB_CHARS_LO];
|
||||||
|
wc = composed->base;
|
||||||
|
}
|
||||||
|
|
||||||
if (wc == 0 || (!first && !isword(wc, spaces_only, term->conf->word_delimiters))) {
|
if (wc == 0 || (!first && !isword(wc, spaces_only, term->conf->word_delimiters))) {
|
||||||
done = true;
|
done = true;
|
||||||
break;
|
break;
|
||||||
|
|
@ -480,6 +488,11 @@ search_match_to_end_of_word(struct terminal *term, bool spaces_only)
|
||||||
|
|
||||||
first = false;
|
first = false;
|
||||||
tll_push_back(new_chars, wc);
|
tll_push_back(new_chars, wc);
|
||||||
|
|
||||||
|
if (composed != NULL) {
|
||||||
|
for (size_t i = 0; i < composed->count; i++)
|
||||||
|
tll_push_back(new_chars, composed->combining[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (done)
|
if (done)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue