Finalize macros that are being typed (both in main document WA and in search/replace one), right before starting an advanced search/replace operation.

Fixes #6887.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36423 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Tommaso Cucinotta 2010-11-21 15:45:35 +00:00
parent 934e013505
commit f8e4f97b67

View 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());