engine: a search just begun shows itself
Ctrl+E and Ctrl+H gave no sign until a key produced candidates; with nothing pending the popup even went away. An empty search now shows ☺ or 漢 in the popup, so the user knows the next keys are a query.
This commit is contained in:
@@ -43,7 +43,8 @@ Hiragana mode composes a complete reading before offering Kanji candidates.
|
|||||||
Katakana mode does not perform Kanji conversion. Emoji and Hanja searches
|
Katakana mode does not perform Kanji conversion. Emoji and Hanja searches
|
||||||
return to the previous mode after use; switching language during a search
|
return to the previous mode after use; switching language during a search
|
||||||
commits the shown query; `Esc` in a Hanja search gives the syllable back
|
commits the shown query; `Esc` in a Hanja search gives the syllable back
|
||||||
to the composition. The Emoji search matches the typed keys, and what
|
to the composition. A search with nothing typed yet shows ☺ or 漢 in the
|
||||||
|
popup. The Emoji search matches the typed keys, and what
|
||||||
they spell in the current language, against a prefix of every emoji's
|
they spell in the current language, against a prefix of every emoji's
|
||||||
CLDR name and keywords in English, Korean, and Japanese, and against ASCII
|
CLDR name and keywords in English, Korean, and Japanese, and against ASCII
|
||||||
symbol aliases such as `->` and `<=`. `Ctrl+H` takes the syllable being composed as its
|
symbol aliases such as `->` and `<=`. `Ctrl+H` takes the syllable being composed as its
|
||||||
|
|||||||
2
strans.c
2
strans.c
@@ -192,6 +192,8 @@ snapshot(Drawcmd *dc)
|
|||||||
impre(&im, &pre);
|
impre(&im, &pre);
|
||||||
if(!(activecap & Cclientpreedit))
|
if(!(activecap & Cclientpreedit))
|
||||||
dc->pre = pre;
|
dc->pre = pre;
|
||||||
|
if(search.lang && pre.n == 0) /* a search just begun shows itself */
|
||||||
|
sputr(&dc->pre, search.lang == LangEMOJI ? L'☺' : L'漢');
|
||||||
first = pagefirst();
|
first = pagefirst();
|
||||||
n = im.nkouho - first;
|
n = im.nkouho - first;
|
||||||
if(n > Maxdisp) n = Maxdisp;
|
if(n > Maxdisp) n = Maxdisp;
|
||||||
|
|||||||
@@ -1359,6 +1359,8 @@ engine_emoji_single_candidate(struct ct *t)
|
|||||||
CT_CHECK(t, keystroke('e', Mctrl, &com));
|
CT_CHECK(t, keystroke('e', Mctrl, &com));
|
||||||
CT_CHECK(t, search.lang);
|
CT_CHECK(t, search.lang);
|
||||||
CT_EQ_INT(t, LangKO, im.l->lang);
|
CT_EQ_INT(t, LangKO, im.l->lang);
|
||||||
|
if(CT_CHECK(t, draindraw(&dc) > 0))
|
||||||
|
checkstr(t, "empty search shows itself", "☺", &dc.pre);
|
||||||
if(typekeys(t, "alpha", &com)){
|
if(typekeys(t, "alpha", &com)){
|
||||||
checkstr(t, "no automatic commit", "", &com);
|
checkstr(t, "no automatic commit", "", &com);
|
||||||
checkstr(t, "raw English query", "alpha", &search.text);
|
checkstr(t, "raw English query", "alpha", &search.text);
|
||||||
|
|||||||
Reference in New Issue
Block a user