diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-06-15 06:40:23 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-06-24 15:30:47 +0000 |
| commit | f865612667d090b584c1ea6cc20f32fcffd828d9 (patch) | |
| tree | 3b4db7051f83f50b36781a3bb1db177d17735327 | |
| parent | render: we’ve already assigned ‘base’ a couple of lines higher up (diff) | |
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.
| -rw-r--r-- | vt.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |
