Skip to content

Commit b19333e

Browse files
committed
Fix the bug that preedit is not updated
1 parent 5ce5622 commit b19333e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cskk.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ void FcitxCskkContext::updateUI() {
341341
}
342342
auto &config = engine_->config();
343343
auto &inputPanel = ic_->inputPanel();
344+
inputPanel.reset();
344345

345346
// Output
346347
if (auto output = skk_context_poll_output(context_)) {
@@ -449,6 +450,8 @@ FcitxCskkContext::formatPreedit(CskkStateInfoFfi *cskkStateInfoArray,
449450
std::string precomposition_marker = "";
450451
std::string selection_marker = "";
451452
Text mainContent = Text(""), supplementContent = Text("");
453+
mainContent.clear();
454+
supplementContent.clear();
452455
size_t mainCursorIdx = 0;
453456
for (uint32_t i = 0; i < stateLen; i++) {
454457
auto cskkStateInfo = cskkStateInfoArray[i];
@@ -527,7 +530,6 @@ FcitxCskkContext::formatPreedit(CskkStateInfoFfi *cskkStateInfoArray,
527530
mainContent.append(tmpContentString, TextFormatFlag::Underline);
528531

529532
if (compositionSelectionStateInfo.annotation) {
530-
supplementContent.clear();
531533
supplementContent.append(compositionSelectionStateInfo.annotation,
532534
TextFormatFlag::DontCommit);
533535
}

0 commit comments

Comments
 (0)