]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfind.cpp
Embedding: saving inzip name to .lyx file so that embedded files can always be found...
[lyx.git] / src / lyxfind.cpp
index 4186fa8f1eac0be183d29fb20ce72c44ee7072d5..8406c77193f9a632be8acc58fa326c953aedac44 100644 (file)
@@ -22,9 +22,9 @@
 #include "buffer_funcs.h"
 #include "BufferView.h"
 #include "Changes.h"
-#include "debug.h"
+#include "support/debug.h"
 #include "FuncRequest.h"
-#include "gettext.h"
+#include "support/gettext.h"
 #include "Text.h"
 #include "Paragraph.h"
 #include "ParIterator.h"
 #include "support/docstream.h"
 #include "support/lstrings.h"
 
-namespace lyx {
-
-using support::compare_no_case;
-using support::uppercase;
-using support::split;
-
-using std::advance;
+using namespace std;
+using namespace lyx::support;
 
+namespace lyx {
 
 namespace {
 
@@ -56,7 +52,7 @@ bool parse_bool(docstring & howto)
 }
 
 
-class MatchString : public std::binary_function<Paragraph, pos_type, bool>
+class MatchString : public binary_function<Paragraph, pos_type, bool>
 {
 public:
        MatchString(docstring const & str, bool cs, bool mw)
@@ -212,6 +208,7 @@ int replace(BufferView * bv, docstring const & searchstr,
        cap::replaceSelectionWithString(cur, replacestr, fw);
        bv->buffer().markDirty();
        find(bv, searchstr, cs, mw, fw, false);
+       bv->buffer().updateMacros();
        bv->processUpdateFlags(Update::Force | Update::FitCursor);
 
        return 1;
@@ -252,7 +249,7 @@ void find(BufferView * bv, FuncRequest const & ev)
        if (!bv || ev.action != LFUN_WORD_FIND)
                return;
 
-       //lyxerr << "find called, cmd: " << ev << std::endl;
+       //lyxerr << "find called, cmd: " << ev << endl;
 
        // data is of the form
        // "<search>