Skip to content

Commit

Permalink
hide candidate list by rime option
Browse files Browse the repository at this point in the history
  • Loading branch information
mokapsing committed Jun 25, 2024
1 parent 92b4073 commit e849595
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rimestate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,9 @@ void RimeState::updateUI(InputContext *ic, bool keyRelease) {

updatePreedit(ic, context);

if (context.menu.num_candidates > 1) {
Bool isHidden = api->get_option(session, FCITX_HIDDEN_CANDIDATES);

if (context.menu.num_candidates > 0 && !isHidden) {
ic->inputPanel().setCandidateList(
std::make_unique<RimeCandidateList>(engine_, ic, context));
} else {
Expand Down
2 changes: 2 additions & 0 deletions src/rimestate.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

#define RIME_ASCII_MODE "ascii_mode"

#define FCITX_HIDDEN_CANDIDATES "_hide_candidate"

namespace fcitx {

class RimeEngine;
Expand Down

0 comments on commit e849595

Please sign in to comment.