Skip to content

Commit

Permalink
Revert "Remove the unnecessary workaround since we're requiring 0.7.0"
Browse files Browse the repository at this point in the history
This reverts commit c85da1d.
  • Loading branch information
wengxt committed May 3, 2024
1 parent fbe1185 commit bc94460
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/eim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,14 @@ void ChewingEngine::keyEvent(const InputMethodEntry &entry,
chewing_set_easySymbolInput(ctx, *config_.EasySymbolInput ? 1 : 0);
}
int scan_code = keyEvent.key().sym() & 0xff;
if (*config_.Layout == ChewingLayout::HanYuPinYin) {
auto zuin = safeChewing_bopomofo_String(ctx);
// Workaround a bug in libchewing fixed in 2017 but never has
// stable release.
if (zuin.size() >= 9) {
return keyEvent.filterAndAccept();
}
}
chewing_handle_Default(ctx, scan_code);
chewing_set_easySymbolInput(ctx, 0);
} else if (keyEvent.key().check(FcitxKey_BackSpace)) {
Expand Down

0 comments on commit bc94460

Please sign in to comment.