commit 162c1f316b60deda19de37500a64cf5f0a7163fc
Author: Kornel Benko <[email protected]>
Date: Mon Oct 15 08:09:19 2018 +0200
Amend(3) 7a03fa6: Advanced search with format:
Grrr... enable the search without format again
---
src/lyxfind.cpp | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp
index baec6ab..00d2cf9 100644
--- a/src/lyxfind.cpp
+++ b/src/lyxfind.cpp
@@ -1576,10 +1576,17 @@ static string correctlanguagesetting(string par, bool
from_regex, bool withforma
while ((parlen > 0) && (par[parlen-1] == '\n')) {
parlen--;
}
- string result = removefontinfo(par.substr(0, parlen));
- LYXERR(Debug::FIND, "input: \"" << result << "\"");
- result = splitForColors(result);
- LYXERR(Debug::FIND, "After split: \"" << result << "\"");
+ string result;
+ if (withformat) {
+ // Split the latex input into pieces which
+ // can be digested by our search engine
+ result = removefontinfo(par.substr(0, parlen));
+ LYXERR(Debug::FIND, "input: \"" << result << "\"");
+ result = splitForColors(result);
+ LYXERR(Debug::FIND, "After split: \"" << result << "\"");
+ }
+ else
+ result = par.substr(0, parlen);
bool handle_colors = false;
if (from_regex) {
missed = 0;