@@ -210,7 +210,8 @@ void LibThaiEngine::keyEvent(const InputMethodEntry & /*entry*/,
210
210
prevChar = prevChars.back ();
211
211
}
212
212
if (!th_isaccept (prevChar, newChar, *config_.strictness )) {
213
- keyEvent.filterAndAccept (); return ;
213
+ keyEvent.filterAndAccept ();
214
+ return ;
214
215
}
215
216
if (state->commitString (&newChar, 1 )) {
216
217
keyEvent.filterAndAccept ();
@@ -223,14 +224,16 @@ void LibThaiEngine::keyEvent(const InputMethodEntry & /*entry*/,
223
224
state->prevCell (&contextCell);
224
225
if (!th_validate_leveled (contextCell, newChar, &conv,
225
226
*config_.strictness )) {
226
- keyEvent.filterAndAccept (); return ;
227
+ keyEvent.filterAndAccept ();
228
+ return ;
227
229
}
228
230
229
231
if (conv.offset < 0 ) {
230
232
// SurroundingText not supported, so just reject the key.
231
233
if (!keyEvent.inputContext ()->capabilityFlags ().test (
232
234
CapabilityFlag::SurroundingText)) {
233
- keyEvent.filter (); return ;
235
+ keyEvent.filter ();
236
+ return ;
234
237
}
235
238
236
239
keyEvent.inputContext ()->deleteSurroundingText (conv.offset ,
@@ -240,11 +243,13 @@ void LibThaiEngine::keyEvent(const InputMethodEntry & /*entry*/,
240
243
state->rememberPrevChars (newChar);
241
244
if (state->commitString (conv.conv ,
242
245
strlen (reinterpret_cast <char *>(conv.conv )))) {
243
- keyEvent.filterAndAccept (); return ;
246
+ keyEvent.filterAndAccept ();
247
+ return ;
244
248
}
245
249
}
246
250
247
- void LibThaiEngine::reset (const InputMethodEntry & /* entry*/ , InputContextEvent &event) {
251
+ void LibThaiEngine::reset (const InputMethodEntry & /* entry*/ ,
252
+ InputContextEvent &event) {
248
253
auto *state = event.inputContext ()->propertyFor (&factory_);
249
254
state->forgetPrevChars ();
250
255
}
0 commit comments