Skip to content

Commit 17bc261

Browse files
committed
Format fix
1 parent b19333e commit 17bc261

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

src/cskk.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,8 @@ void FcitxCskkContext::updateUI() {
361361
// CandidateList
362362
int currentCursorPosition =
363363
skk_context_get_current_candidate_cursor_position(context_);
364-
bool showCandidateList = currentCursorPosition > engine_->config().pageStartIdx.value() - 1;
364+
bool showCandidateList =
365+
currentCursorPosition > engine_->config().pageStartIdx.value() - 1;
365366
if (showCandidateList) {
366367
char *current_to_composite = skk_context_get_current_to_composite(context_);
367368
auto currentCandidateList =
@@ -386,8 +387,11 @@ void FcitxCskkContext::updateUI() {
386387

387388
if (ic_->capabilityFlags().test(CapabilityFlag::Preedit)) {
388389
inputPanel.setClientPreedit(mainPreedit);
389-
if ((config.showAnnotationCondition.value() == ShowAnnotationCondition::Always) ||
390-
(config.showAnnotationCondition.value() == ShowAnnotationCondition::SingleCandidate && !showCandidateList)) {
390+
if ((config.showAnnotationCondition.value() ==
391+
ShowAnnotationCondition::Always) ||
392+
(config.showAnnotationCondition.value() ==
393+
ShowAnnotationCondition::SingleCandidate &&
394+
!showCandidateList)) {
391395
inputPanel.setPreedit(supplementPreedit);
392396
}
393397
ic_->updatePreedit();

src/cskkconfig.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,9 @@ FCITX_CONFIG_ENUM_NAME_WITH_I18N(CandidateLayoutHint, N_("Not set"),
3737

3838
FCITX_CONFIG_ENUM(CandidateSelectionKeys, Number, ABCD, QwertyCenter)
3939

40-
enum class ShowAnnotationCondition {
41-
Always, SingleCandidate, Never
42-
};
40+
enum class ShowAnnotationCondition { Always, SingleCandidate, Never };
4341
FCITX_CONFIG_ENUM_NAME_WITH_I18N(ShowAnnotationCondition, N_("Always"),
44-
N_("SingleCandidate"), N_("Never"));
42+
N_("SingleCandidate"), N_("Never"));
4543

4644
static constexpr const char *CandidateSelectionKeys_Annotations[] = {
4745
"Number (1,2,3,...)", "ABCD (a,b,c,d,...)",
@@ -143,8 +141,8 @@ FCITX_CONFIGURATION(
143141
showAnnotationCondition{this, "Show Annotation when",
144142
_("Show Annotation when"),
145143
ShowAnnotationCondition::Always};
146-
ExternalOption dictionary{this, "Dictionary", _("Dictionary"),
147-
"fcitx://config/addon/cskk/dictionary_list"};
148-
) // FCITX_CONFIGURATION
144+
ExternalOption dictionary{
145+
this, "Dictionary", _("Dictionary"),
146+
"fcitx://config/addon/cskk/dictionary_list"};) // FCITX_CONFIGURATION
149147
} // namespace fcitx
150148
#endif // FCITX5_CSKK_CSKKCONFIG_H

0 commit comments

Comments
 (0)