]> git.lyx.org Git - features.git/commitdiff
Finalize macros that are being typed (both in main document WA and in search/replace...
authorTommaso Cucinotta <tommaso@lyx.org>
Sun, 21 Nov 2010 15:45:35 +0000 (15:45 +0000)
committerTommaso Cucinotta <tommaso@lyx.org>
Sun, 21 Nov 2010 15:45:35 +0000 (15:45 +0000)
Fixes #6887.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36423 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/FindAndReplace.cpp

index c2a2d653795cf38dff91b3fde5a6dbf6f10945ac..6834851cbffd9839f398b59bfa0a03f9c4e5b822 100644 (file)
@@ -454,6 +454,12 @@ void FindAndReplaceWidget::findAndReplace(bool backwards, bool replace)
                view_.message(_("No open document(s) in which to search"));
                return;
        }
+       // Finalize macros that are being typed, both in main document and in search or replacement WAs
+       if (view_.currentWorkArea()->bufferView().cursor().macroModeClose())
+               view_.currentWorkArea()->bufferView().processUpdateFlags(Update::Force);
+       if (view_.currentMainWorkArea()->bufferView().cursor().macroModeClose())
+               view_.currentMainWorkArea()->bufferView().processUpdateFlags(Update::Force);
+
        // FIXME: create a Dialog::returnFocus()
        // or something instead of this:
        view_.setCurrentWorkArea(view_.currentMainWorkArea());