From 94dd5ed6ebe19aa8f188f0fb24d5d02bb75cd246 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Fri, 30 Jun 2023 16:31:13 +0200 Subject: [PATCH] Avoid unnecessary cprotect loading (#12826) --- src/insets/InsetText.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 27b6a49b5a..9003652992 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -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; } }