]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfind.cpp
fix MSVC warning.
[lyx.git] / src / lyxfind.cpp
index 14760d0e333e132a8c2c302a9b00752413a879f0..514c508114f62b69c1db5364414faa71bf767538 100644 (file)
 #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"
 
@@ -137,7 +138,7 @@ bool findChange(DocIterator & cur)
 }
 
 
-bool searchAllowed(BufferView * bv, docstring const & str)
+bool searchAllowed(BufferView * /*bv*/, docstring const & str)
 {
        if (str.empty()) {
                frontend::Alert::error(_("Search error"),
@@ -177,7 +178,7 @@ int replaceAll(BufferView * bv,
        if (!searchAllowed(bv, searchstr) || buf.isReadonly())
                return 0;
 
-       recordUndoFullDocument(bv);
+       bv->cursor().recordUndoFullDocument();
 
        MatchString const match(searchstr, cs, mw);
        int num = 0;
@@ -237,7 +238,7 @@ int replace(BufferView * bv, docstring const & searchstr,
        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;
 }