fix: forward input at the composition limit
This commit is contained in:
@@ -1280,3 +1280,33 @@ engine_randomized_stress(struct ct *t)
|
||||
emojiend(&f);
|
||||
vi->map = vimap;
|
||||
}
|
||||
|
||||
void
|
||||
engine_full_boundary_passthrough(struct ct *t)
|
||||
{
|
||||
Str com;
|
||||
int i;
|
||||
|
||||
init();
|
||||
im.l = getlang(LangJP);
|
||||
for(i = 0; i < Maxrunes; i++)
|
||||
im.pre.r[i] = L'あ';
|
||||
im.pre.n = Maxrunes;
|
||||
sclear(&com);
|
||||
CT_CHECK(t, !keystroke(' ', 0, &com));
|
||||
CT_EQ_INT(t, Maxrunes, com.n);
|
||||
for(i = 0; i < Maxrunes; i++)
|
||||
CT_EQ_UINT(t, L'あ', com.r[i]);
|
||||
CT_EQ_INT(t, 0, im.pre.n);
|
||||
CT_EQ_INT(t, 0, im.raw.n);
|
||||
|
||||
init();
|
||||
im.l = getlang(LangJP);
|
||||
for(i = 0; i < Maxrunes-1; i++)
|
||||
im.pre.r[i] = L'あ';
|
||||
im.pre.n = Maxrunes-1;
|
||||
sclear(&com);
|
||||
CT_CHECK(t, keystroke(' ', 0, &com));
|
||||
CT_EQ_INT(t, Maxrunes, com.n);
|
||||
CT_EQ_UINT(t, ' ', com.r[Maxrunes-1]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user