]> git.lyx.org Git - features.git/commitdiff
Amend(3) 7a03fa6: Advanced search with format:
authorKornel Benko <kornel@lyx.org>
Mon, 15 Oct 2018 06:09:19 +0000 (08:09 +0200)
committerKornel Benko <kornel@lyx.org>
Mon, 15 Oct 2018 06:09:19 +0000 (08:09 +0200)
Grrr... enable the search without format again

src/lyxfind.cpp

index baec6ab5c3d63192064594a20ac90d8e42f336e9..00d2cf9dcf881ac0c94623460f3aa768ec5d2d06 100644 (file)
@@ -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;