]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfind.cpp
Correct Right Arrow key processing in Modules list
[lyx.git] / src / lyxfind.cpp
index c65d2ca7c05011211ac655b6d8e9985e4d41f664..70de6c96a816164aadd5da2ddb6fa88b1243a71a 100644 (file)
@@ -970,7 +970,7 @@ static size_t identifyLeading(string const & s)
               || regex_replace(t, t, REGEX_BOS "\\$", "")
               || regex_replace(t, t, REGEX_BOS "\\\\\\[", "")
               || regex_replace(t, t, REGEX_BOS " ?\\\\item\\{[a-z]+\\}", "")
-              || regex_replace(t, t, REGEX_BOS "\\\\begin\\{[a-zA-Z_]*\\*?\\} ", ""))
+              || regex_replace(t, t, REGEX_BOS "\\\\begin\\{[a-zA-Z_]*\\*?\\}", ""))
               ;
        LYXERR(Debug::FIND, "  after removing leading $, \\[ , \\emph{, \\textbf{, etc.: '" << t << "'");
        return s.find(t);
@@ -2713,7 +2713,7 @@ static int identifyClosing(string & t)
                        continue;
                if (regex_replace(t, t, "(.*[^\\\\])\\\\\\]" REGEX_EOS, "$1"))
                        continue;
-               if (regex_replace(t, t, "(.*[^\\\\]) \\\\end\\{[a-zA-Z_]*\\*?\\}" REGEX_EOS, "$1"))
+               if (regex_replace(t, t, "(.*[^\\\\])\\\\end\\{[a-zA-Z_]*\\*?\\}" REGEX_EOS, "$1"))
                        continue;
                if (regex_replace(t, t, "(.*[^\\\\])\\}" REGEX_EOS, "$1")) {
                        ++open_braces;