commit 122e60d741e9da871706edc518729be8582ee255
Author: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date:   Mon Apr 21 12:53:34 2025 +0200

    Fix handling of \int with external math tools
    
    (cherry picked from commit 0ed7820843d2b4dd09240d6e6145ddb013d090b8)
---
 src/mathed/MathExtern.cpp | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/mathed/MathExtern.cpp b/src/mathed/MathExtern.cpp
index 6b3146de59..a31e00f738 100644
--- a/src/mathed/MathExtern.cpp
+++ b/src/mathed/MathExtern.cpp
@@ -295,7 +295,7 @@ bool testString(MathAtom const & at, char const * const str)
 
 bool testSymbol(MathAtom const & at, docstring const & name)
 {
-       return at->asSymbolInset() && at->asSymbolInset()->name() == name;
+       return (at->asSymbolInset() || at->asMacro()) && at->name() == name;
 }
 
 
@@ -376,9 +376,8 @@ void splitScripts(MathData & ar)
 
                if (script->nuc().size() == 1) {
                        // leave alone sums and integrals
-                       InsetMathSymbol const * sym =
-                               script->nuc().front()->asSymbolInset();
-                       if (sym && (sym->name() == "sum" || sym->name() == 
"int"))
+                       MathAtom const & atom = script->nuc().front();
+                       if (testSymbol(atom, "sum") || testSymbol(atom, "int"))
                                continue;
                }
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to