From 162c1f316b60deda19de37500a64cf5f0a7163fc Mon Sep 17 00:00:00 2001 From: Kornel Benko Date: Mon, 15 Oct 2018 08:09:19 +0200 Subject: [PATCH] Amend(3) 7a03fa6: Advanced search with format: Grrr... enable the search without format again --- src/lyxfind.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index baec6ab5c3..00d2cf9dcf 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; -- 2.39.2