[LyX/master] Set advanced repl_buffer internal as well (#12246)

Juergen Spitzmueller spitz at lyx.org
Sun Apr 11 15:58:57 UTC 2021


commit ebb34a4614c29d8fdd3fc097ca85af12c845ff98
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Sun Apr 11 18:06:11 2021 +0200

    Set advanced repl_buffer internal as well (#12246)
---
 src/lyxfind.cpp |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp
index 09bfead..444db69 100644
--- a/src/lyxfind.cpp
+++ b/src/lyxfind.cpp
@@ -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) {


More information about the lyx-cvs mailing list