Skip to content

Commit b563cd0

Browse files
committed
hidden candidate by rime option
1 parent 92b4073 commit b563cd0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/rimestate.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,9 @@ void RimeState::updateUI(InputContext *ic, bool keyRelease) {
438438

439439
updatePreedit(ic, context);
440440

441-
if (context.menu.num_candidates > 1) {
441+
Bool isHidden = api->get_option(session, FCITX_HIDDEN_CANDIDATES);
442+
443+
if (context.menu.num_candidates > 0 && !isHidden) {
442444
ic->inputPanel().setCandidateList(
443445
std::make_unique<RimeCandidateList>(engine_, ic, context));
444446
} else {

src/rimestate.h

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
#define RIME_ASCII_MODE "ascii_mode"
2222

23+
#define FCITX_HIDDEN_CANDIDATES "_hide_candidate"
24+
2325
namespace fcitx {
2426

2527
class RimeEngine;

0 commit comments

Comments
 (0)