engine: trim the key dispatch

mapget and maplookup were one trie probe with two predicates; mapmatch
returns the match kind and mapget is its exact case. movedelta is a
switch. searchkey's modifier test was unreachable behind transition's,
searchlang's Alt/Super test behind both callers' earlier returns, and
picksearch's range check behind numberedkouho. Korean key folding runs
once at the top of transition. commit() on an empty preedit is a no-op,
so the Ctrl branch and startsearch lose their haspre guards and repeated
commit/reset pairs. Ctrl+language inside a search now commits the shown
query as it does elsewhere instead of dropping it. Language ids are
documented as the Ctrl codes they are; Im parameters no longer shadow
the file's Im.
This commit is contained in:
2026-08-16 16:09:05 +09:00
parent 68869e2589
commit 9080bb833c
3 changed files with 81 additions and 103 deletions

1
dat.h
View File

@@ -7,6 +7,7 @@
#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))
/* A language id is the control code of the Ctrl key that selects it. */
enum
{
LangEN = 0x14,