#include "lyxfind.h"
#include "Buffer.h"
+#include "BufferParams.h"
#include "Cursor.h"
#include "CutAndPaste.h"
#include "buffer_funcs.h"
#include "BufferView.h"
+#include "Changes.h"
#include "debug.h"
#include "FuncRequest.h"
#include "gettext.h"
#include "Text.h"
#include "Paragraph.h"
#include "ParIterator.h"
-#include "Undo.h"
#include "frontends/alert.h"
}
-bool searchAllowed(BufferView * bv, docstring const & str)
+bool searchAllowed(BufferView * /*bv*/, docstring const & str)
{
if (str.empty()) {
frontend::Alert::error(_("Search error"),
if (!searchAllowed(bv, searchstr) || buf.isReadonly())
return 0;
- recordUndoFullDocument(bv);
+ bv->cursor().recordUndoFullDocument();
MatchString const match(searchstr, cs, mw);
int num = 0;
cap::replaceSelectionWithString(cur, replacestr, fw);
bv->buffer().markDirty();
find(bv, searchstr, cs, mw, fw, false);
- bv->update();
+ bv->processUpdateFlags(Update::Force | Update::FitCursor);
return 1;
}