commit 4ab7445d6977955ee37c841b2c88c14632798d5b
Author: Juergen Spitzmueller <[email protected]>
Date:   Fri Oct 17 11:56:30 2025 +0200

    Amend 6d5e17998506b
    
    cprotection is not needed for inline listings, and the protection
    of these can be harmful, see
    https://marc.info/?l=lyx-users&m=176068975231459&w=2
---
 lib/layouts/stdinsets.inc  | 1 -
 src/insets/InsetListings.h | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/layouts/stdinsets.inc b/lib/layouts/stdinsets.inc
index 4305d95aa4..735efcdca3 100644
--- a/lib/layouts/stdinsets.inc
+++ b/lib/layouts/stdinsets.inc
@@ -375,7 +375,6 @@ InsetLayout Listings
        FreeSpacing           true
        ForceLTR              true
        ForcePlain            true
-       NeedCProtect          true
        RefPrefix             lst
        EditExternal          true
        HTMLTag               code
diff --git a/src/insets/InsetListings.h b/src/insets/InsetListings.h
index e01b5fd498..bd3833460d 100644
--- a/src/insets/InsetListings.h
+++ b/src/insets/InsetListings.h
@@ -44,6 +44,8 @@ public:
        static std::string params2string(InsetListingsParams const &);
        ///
        bool isEnvironment() const override { return !params().isInline(); }
+       ///
+       bool needsCProtection(bool const, bool const) const override { return 
!params().isInline(); }
 private:
        ///
        bool isLabeled() const override { return true; }
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to