]> git.lyx.org Git - features.git/commitdiff
Update correctly completion after undo
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 14 Oct 2021 14:39:33 +0000 (16:39 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 14 Oct 2021 14:39:33 +0000 (16:39 +0200)
This is take #2 after reverting e59aee458.

Request the completer to rebuild a completion after undo/redo.

Fixes #12383.

src/frontends/qt/GuiView.cpp

index 767791f57b47fab5920b2dead679a788f4816578..9126d484fa616e8064a17424d4b41a0260ba59f8 100644 (file)
@@ -4067,8 +4067,10 @@ void GuiView::dispatchToBufferView(FuncRequest const & cmd, DispatchResult & dr)
        // Let the current BufferView dispatch its own actions.
        bv->dispatch(cmd, dr);
        if (dr.dispatched()) {
-               if (cmd.action() == LFUN_REDO || cmd.action() == LFUN_UNDO)
+               if (cmd.action() == LFUN_REDO || cmd.action() == LFUN_UNDO) {
+                       updateCompletion(bv->cursor(), true, false);
                        updateDialog("document", "");
+               }
                return;
        }