engine: a Hanja word shows once, as every other candidate does
hanjaquery was the only query that assigned dictprefix's output straight into im.kouho; emojiquery, dictqjp and katakouho all go through addkouho, which is the only place a duplicate is dropped. Two readings under one prefix can carry the same word, and 198 of the 61,479 one- and two-syllable prefixes in hanja.dict do: 게 listed 偈句 at rows 8 and 9, 개근 listed 皆勤狀 twice in five. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
8
strans.c
8
strans.c
@@ -653,14 +653,16 @@ emojiquery(void)
|
||||
static void
|
||||
hanjaquery(void)
|
||||
{
|
||||
Str tail;
|
||||
Str kouho[Maxkouho], tail;
|
||||
int i, n;
|
||||
|
||||
transstr(im.l, &search.seed, &search.raw, &tail);
|
||||
search.text = search.back;
|
||||
sappend(&search.text, &tail);
|
||||
clearkouho();
|
||||
im.nkouho = dictprefix(getlang(LangHANJA)->dict, &search.text,
|
||||
im.kouho, Maxkouho);
|
||||
n = dictprefix(getlang(LangHANJA)->dict, &search.text, kouho, Maxkouho);
|
||||
for(i = 0; i < n; i++)
|
||||
addkouho(&kouho[i]);
|
||||
selectfirst();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user