Skip to content

Commit

Permalink
PreeditHandler: update preedit string when it's empty (#1174)
Browse files Browse the repository at this point in the history
See also https://bugreports.qt.io/browse/QTBUG-127995 , Deleted
character appears again when switching languages (Mozc / IBus)

PiperOrigin-RevId: 723804210
  • Loading branch information
liangqi authored Feb 6, 2025
1 parent 1fa3dd4 commit 4175e0d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/unix/ibus/preedit_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ int CursorPos(const commands::Output &output) {
bool PreeditHandler::Update(IbusEngineWrapper *engine,
const commands::Output &output) {
if (!output.has_preedit()) {
IbusTextWrapper empty_text("");
engine->UpdatePreeditTextWithMode(&empty_text, 0);
engine->HidePreeditText();
return true;
}
Expand Down

0 comments on commit 4175e0d

Please sign in to comment.