diff --git a/strans.c b/strans.c index 68ed464..445bb92 100644 --- a/strans.c +++ b/strans.c @@ -671,9 +671,7 @@ transition(u32int ks, u32int mod, Str *com) if(search.lang) return searchkey(ks, mod, com); n = movedelta(ks); - if(n != 0){ - if(im.nkouho == 0) - return 0; + if(n != 0 && im.nkouho != 0){ movekouho(n); return 1; } diff --git a/tests/engine_test.c b/tests/engine_test.c index 43ddcf5..1c36653 100644 --- a/tests/engine_test.c +++ b/tests/engine_test.c @@ -454,6 +454,16 @@ engine_commit_contract(struct ct *t) CT_EQ_INT(t, 0, im.nkouho); CT_EQ_INT(t, -1, im.sel); + /* Without candidates the movement keys commit like any other. */ + init(); + im.l = getlang(LangKO); + sclear(&com); + if(!typekeys(t, "dy", &com)) + return; + CT_CHECK(t, !keystroke(Kdown, 0, &com)); + checkstr(t, "arrow commit", "ěš”", &com); + CT_EQ_INT(t, 0, im.pre.n); + init(); im.l = getlang(LangJP); sclear(&com);