]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfind.cpp
Fix copy&paste bug.
[lyx.git] / src / lyxfind.cpp
index 14760d0e333e132a8c2c302a9b00752413a879f0..a7fe5a38a9cab0c37c7cab4ff76a17152ddcdb9e 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"
 
@@ -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;
 }