engine: a mode switch shows the mode it switched to
Ctrl+S, Ctrl+N and the rest changed the mode with nothing to see; the next key was the only way to tell. The popup now shows A, 한, あ, ア, or ă until a key is typed, beside the ☺ and 漢 a search already shows.
This commit is contained in:
@@ -565,11 +565,25 @@ engine_korean_modifiers_and_backspace(struct ct *t)
|
||||
void
|
||||
engine_direct_language_modes(struct ct *t)
|
||||
{
|
||||
Drawcmd dc;
|
||||
Str com;
|
||||
|
||||
init();
|
||||
draindraw(nil);
|
||||
sclear(&com);
|
||||
CT_EQ_INT(t, LangEN, im.l->lang);
|
||||
/* A switch shows the mode it switched to until the next key. */
|
||||
CT_CHECK(t, keystroke('s', Mctrl, &com));
|
||||
if(CT_CHECK(t, draindraw(&dc) > 0))
|
||||
checkstr(t, "mode mark", "한", &dc.pre);
|
||||
CT_CHECK(t, keystroke('t', Mctrl, &com));
|
||||
if(CT_CHECK(t, draindraw(&dc) > 0))
|
||||
checkstr(t, "mode mark", "A", &dc.pre);
|
||||
CT_CHECK(t, !keystroke('a', 0, &com));
|
||||
if(CT_CHECK(t, draindraw(&dc) > 0))
|
||||
CT_EQ_INT(t, 0, dc.pre.n);
|
||||
CT_CHECK(t, !keystroke('a', 0, &com));
|
||||
CT_EQ_INT(t, 0, draindraw(nil));
|
||||
CT_EQ_PTR(t, nil, im.l->mapname);
|
||||
CT_EQ_PTR(t, nil, im.l->map);
|
||||
CT_EQ_PTR(t, nil, im.l->trans);
|
||||
|
||||
Reference in New Issue
Block a user