]> git.lyx.org Git - features.git/commitdiff
Avoid unnecessary cprotect loading (#12826)
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 30 Jun 2023 14:31:13 +0000 (16:31 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Fri, 30 Jun 2023 14:31:13 +0000 (16:31 +0200)
src/insets/InsetText.cpp

index 27b6a49b5a9b94c5261f7c03596f16e78aaf0b4b..9003652992d4bf82145d3f16eb3034d6e803c8de 100644 (file)
@@ -1435,7 +1435,7 @@ bool InsetText::needsCProtection(bool const maintext, bool const fragile) const
                        return true;
                docstring const par_str = par.asString();
                for (int k = 0; k < nchars_escape; k++) {
-                       if (contains(par_str, chars_escape[k]))
+                       if (!maintext && contains(par_str, chars_escape[k]))
                                return true;
                }
        }