aboutsummaryrefslogtreecommitdiff
path: root/vt.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-06-15 06:40:23 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-06-24 15:30:47 +0000
commitf865612667d090b584c1ea6cc20f32fcffd828d9 (patch)
tree3b4db7051f83f50b36781a3bb1db177d17735327 /vt.c
parentrender: 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.
Diffstat (limited to 'vt.c')
-rw-r--r--vt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vt.c b/vt.c
index b99b4fef..c2e72e71 100644
--- a/vt.c
+++ b/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;