mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
vt: utf8-print: check base character before count when looking for existing compose chain
Count is more likely to be the same for many chains. Thus we’re likely to fail sooner by checking the base character first.
This commit is contained in:
parent
51295cd7a2
commit
f865612667
1 changed files with 2 additions and 2 deletions
4
vt.c
4
vt.c
|
|
@ -697,10 +697,10 @@ action_utf8_print(struct terminal *term, wchar_t wc)
|
|||
for (size_t i = 0; i < term->composed_count; i++) {
|
||||
const struct composed *cc = &term->composed[i];
|
||||
|
||||
if (cc->count != wanted_count)
|
||||
if (cc->chars[0] != base)
|
||||
continue;
|
||||
|
||||
if (cc->chars[0] != base)
|
||||
if (cc->count != wanted_count)
|
||||
continue;
|
||||
|
||||
bool match = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue