[LyX/master] Sett forward to true by default in search string parsing
Juergen Spitzmueller
spitz at lyx.org
Mon Feb 15 08:40:57 UTC 2021
commit b2a317c037f613bcd35721f5e7b9dab20ad38a72
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Mon Feb 15 09:41:16 2021 +0100
Sett forward to true by default in search string parsing
---
src/lyxfind.cpp | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp
index 61176b9..ffbd923 100644
--- a/src/lyxfind.cpp
+++ b/src/lyxfind.cpp
@@ -191,10 +191,10 @@ void setIgnoreFormat(string const & type, bool value, bool fromUser)
namespace {
-bool parse_bool(docstring & howto)
+bool parse_bool(docstring & howto, bool const defvalue = false)
{
if (howto.empty())
- return false;
+ return defvalue;
docstring var;
howto = split(howto, var, ' ');
return var == "1";
@@ -482,7 +482,7 @@ docstring const string2find(docstring const & argument,
casesensitive = parse_bool(howto);
matchword = parse_bool(howto);
- forward = parse_bool(howto);
+ forward = parse_bool(howto, true);
return search;
}
@@ -520,7 +520,7 @@ bool lyxreplace(BufferView * bv, FuncRequest const & ev)
bool casesensitive = parse_bool(howto);
bool matchword = parse_bool(howto);
bool all = parse_bool(howto);
- bool forward = parse_bool(howto);
+ bool forward = parse_bool(howto, true);
bool findnext = howto.empty() ? true : parse_bool(howto);
bool update = false;
More information about the lyx-cvs
mailing list