diff --git a/src/rime/gear/chord_composer.cc b/src/rime/gear/chord_composer.cc index 934e923bf7..e3b3a4a573 100644 --- a/src/rime/gear/chord_composer.cc +++ b/src/rime/gear/chord_composer.cc @@ -174,6 +174,11 @@ void ChordComposer::UpdateChord(const Chord& chord) { return; Context* ctx = engine_->context(); Composition& comp = ctx->composition(); + // do not show chord prompt if the chord is empty or only contains space. + if (chord.empty() || (chord.size() == 1 && chord.count(' ') > 0)) { + ClearChord(); + return; + } string code = SerializeChord(chord); prompt_format_.Apply(&code); if (comp.empty()) {