]> git.lyx.org Git - features.git/blobdiff - src/lyxfind.cpp
Revert "Revert "Fix commented out code""
[features.git] / src / lyxfind.cpp
index 09bfeadcb107d09a7d2a39006a00d5007ad9932a..444db69a9896c72c6837b60690b6d9edb769f1df 100644 (file)
@@ -4284,10 +4284,10 @@ static int findAdvReplace(BufferView * bv, FindAndReplaceOptions const & opt, Ma
        ostringstream oss;
        repl_buffer_orig.write(oss);
        string lyx = oss.str();
-       if (matchAdv.valid_matches > 0) {
-         replaceMatches(lyx, matchAdv.valid_matches, matchAdv.matches);
-       }
-       Buffer repl_buffer("", false);
+       if (matchAdv.valid_matches > 0)
+               replaceMatches(lyx, matchAdv.valid_matches, matchAdv.matches);
+       Buffer repl_buffer(string(), false);
+       repl_buffer.setInternal(true);
        repl_buffer.setUnnamed(true);
        LASSERT(repl_buffer.readString(lyx), return 0);
        if (opt.keep_case && sel_len >= 2) {