commit b192771688d7139eec08fa70500bd4e77a671fc2
Author: Juergen Spitzmueller <[email protected]>
Date:   Wed Sep 23 08:00:25 2026 +0200

    Amend 55a474652fc
    
    A line might open/close more than one group
    
    (cherry picked from commit 0f87d47f5b4df30f9a9afc065db151612ba1b71f)
---
 src/BufferParams.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp
index 963cb74fb2..2ef1e5a997 100644
--- a/src/BufferParams.cpp
+++ b/src/BufferParams.cpp
@@ -2116,10 +2116,8 @@ bool isAtOther(docstring const passage, docstring & 
context)
 
                // catcode changes are local, so skip those inside
                // local contexts (groups)
-               if (contains(token, '{'))
-                       ++group_level;
-               if (contains(token, '}'))
-                       --group_level;
+               group_level += count_char(token, '{');
+               group_level -= count_char(token, '}');
 
                if (token == "\\makeatletter" && group_level == 0) {
                        context = from_ascii(token);
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to