engine: keys outside a map pass on like any other; one candidate query; the caret rides on every key
Space and non-ASCII keys with a Korean or Telex syllable pending were committed as text along with the syllable, while '.', ',' and digits committed the syllable and passed on: one path for both now, through the language's own trans, which commits and passes on. Japanese Space is its own key already. dictqjp() knows which languages have candidates; its two callers no longer choose between it and clearkouho(). Every request carries its owner's caret as the frontend knows it, so a Keypress copies it whether valid or not, and the XIM frontend need not send a Keycaret to say that its spot went away.
This commit is contained in:
@@ -473,10 +473,9 @@ engine_commit_contract(struct ct *t)
|
||||
sclear(&com);
|
||||
if(!typekeys(t, "ka", &com))
|
||||
return;
|
||||
CT_CHECK(t, keystroke(0xf008, 0, &com));
|
||||
CT_EQ_INT(t, 2, com.n);
|
||||
CT_EQ_UINT(t, 0x304b, com.r[0]);
|
||||
CT_EQ_UINT(t, 0xf008, com.r[1]);
|
||||
/* A key outside the map commits the reading and passes on. */
|
||||
CT_CHECK(t, !keystroke(0xf008, 0, &com));
|
||||
checkstr(t, "non-ASCII key commit", "か", &com);
|
||||
CT_EQ_INT(t, 0, im.pre.n);
|
||||
}
|
||||
|
||||
@@ -1301,8 +1300,8 @@ engine_japanese_backspace_and_boundaries(struct ct *t)
|
||||
im.l = getlang(LangJP);
|
||||
sclear(&com);
|
||||
if(typekeys(t, "kanji", &com)){
|
||||
CT_CHECK(t, keystroke(L'日', 0, &com));
|
||||
checkstr(t, "real input boundary", "かんじ日", &com);
|
||||
CT_CHECK(t, !keystroke(L'日', 0, &com));
|
||||
checkstr(t, "real input boundary", "かんじ", &com);
|
||||
}
|
||||
|
||||
init();
|
||||
@@ -2153,9 +2152,9 @@ engine_full_boundary_passthrough(struct ct *t)
|
||||
im.pre.r[i] = L'あ';
|
||||
im.pre.n = Maxrunes-1;
|
||||
sclear(&com);
|
||||
CT_CHECK(t, keystroke(L'日', 0, &com));
|
||||
CT_EQ_INT(t, Maxrunes, com.n);
|
||||
CT_EQ_UINT(t, L'日', com.r[Maxrunes-1]);
|
||||
CT_CHECK(t, !keystroke(L'日', 0, &com));
|
||||
CT_EQ_INT(t, Maxrunes-1, com.n);
|
||||
CT_EQ_INT(t, 0, im.pre.n);
|
||||
|
||||
/* Typing on at the limit commits the kana and keeps the syllable. */
|
||||
init();
|
||||
|
||||
Reference in New Issue
Block a user