Skip to content

Commit

Permalink
don't append "" to preedit Text (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj authored Feb 21, 2024
1 parent 279b23b commit 809a2d4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/hallelujah.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ void HallelujahState::updateUI(InputContext *ic,
std::make_unique<HallelujahCandidateList>(this, words, candidates));
}
Text preedit;
preedit.append(buffer_.userInput());
auto userInput = buffer_.userInput();
if (!userInput.empty()) {
preedit.append(userInput);
}
inputPanel.setPreedit(preedit);
ic->updateUserInterface(UserInterfaceComponent::InputPanel);
}
Expand Down

0 comments on commit 809a2d4

Please sign in to comment.