Skip to content

Commit 5ffb9bf

Browse files
authored
fix: don't set dummy preedit when switching IM for LibreOffice (#172)
1 parent 48f1dbe commit 5ffb9bf

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.gitmodules

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[submodule "fcitx5"]
22
path = fcitx5
3-
url = https://github.com/fcitx/fcitx5
3+
url = https://github.com/fcitx-contrib/fcitx5
44
[submodule "fcitx5-webview"]
55
path = fcitx5-webview
66
url = https://github.com/fcitx-contrib/fcitx5-webview

webpanel/webpanel.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,10 @@ void WebPanel::updateInputPanel(const Text &preedit, const Text &auxUp,
360360

361361
void WebPanel::updateClient(InputContext *ic) {
362362
if (auto macosIC = dynamic_cast<MacosInputContext *>(ic)) {
363-
macosIC->setDummyPreedit(bool(panelShow_));
363+
// Don't set dummy preedit when switching IM. It will clear current cell
364+
// in LibreOffice.
365+
macosIC->setDummyPreedit(bool(panelShow_) &&
366+
!macosIC->inputPanel().transient());
364367
if (!macosIC->isSyncEvent) {
365368
macosIC->commitAndSetPreeditAsync();
366369
}

0 commit comments

Comments
 (0)