]> git.lyx.org Git - lyx.git/commitdiff
Amend 3736bee4: Forgot to set the cassensitivity flag in regex statement
authorKornel Benko <kornel@lyx.org>
Sun, 27 Dec 2020 11:16:37 +0000 (12:16 +0100)
committerKornel Benko <kornel@lyx.org>
Sun, 27 Dec 2020 11:16:37 +0000 (12:16 +0100)
src/lyxfind.cpp

index a9988f978e440eca65d5d9c4c26ebad0e37859f2..e7f345b6e316532a208a6ecd92e7fac3ce98f0f1 100644 (file)
@@ -2884,10 +2884,15 @@ MatchStringAdv::MatchStringAdv(lyx::Buffer & buf, FindAndReplaceOptions const &
                        regexp2_str = "(" + lead_as_regexp + ").*?" + par_as_string;
                }
                LYXERR(Debug::FIND, "Setting regexp to : '" << regexp_str << "'");
-               regexp = regex(regexp_str);
-
                LYXERR(Debug::FIND, "Setting regexp2 to: '" << regexp2_str << "'");
-               regexp2 = regex(regexp2_str);
+               if (! opt.casesensitive) {
+                       regexp = regex(regexp_str, std::regex_constants::icase);
+                       regexp2 = regex(regexp2_str, std::regex_constants::icase);
+               }
+               else {
+                       regexp = regex(regexp_str);
+                       regexp2 = regex(regexp2_str);
+               }
        }
 }