commit 2ac01c85fa8f0c5ff722e5dae203afd22790f3ab
Author: Koji Yokota <yok...@lyx.org>
Date:   Wed May 7 15:30:20 2025 +0900

    Fix undo group level when IM preedit is canceled
---
 src/frontends/qt/GuiInputMethod.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/frontends/qt/GuiInputMethod.cpp 
b/src/frontends/qt/GuiInputMethod.cpp
index ca46063511..18427f7488 100644
--- a/src/frontends/qt/GuiInputMethod.cpp
+++ b/src/frontends/qt/GuiInputMethod.cpp
@@ -190,7 +190,9 @@ void GuiInputMethod::processPreedit(QInputMethodEvent* ev)
        // if preedit is cancelled
        if (ev->preeditString().isEmpty() && ev->commitString().isEmpty() &&
                d->has_selection_ && d->im_state_.preediting_ == true) {
+               d->cur_->beginUndoGroup();
                d->cur_->undoAction();
+               d->cur_->endUndoGroup();
                d->has_selection_ = false;
                d->im_state_.preediting_ = false;
        }
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to