[LyX/master] Fix #13247: CAS - displayed math to eqnarray

Pavel Sanda sanda at lyx.org
Mon Feb 23 21:21:28 UTC 2026


commit c13d02c335df511b79fe16d6578671f40ff26d85
Author: Pavel Sanda <sanda at lyx.org>
Date:   Mon Feb 23 22:18:12 2026 +0100

    Fix #13247: CAS - displayed math to eqnarray
    
    Patch from Georg.
---
 src/mathed/InsetMathHull.cpp | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
index fc16936a76..21d310ca1d 100644
--- a/src/mathed/InsetMathHull.cpp
+++ b/src/mathed/InsetMathHull.cpp
@@ -1887,7 +1887,7 @@ void InsetMathHull::doExtern(Cursor & cur, FuncRequest & func)
 	cur.idx() -= cur.idx() % ncols();
 	cur.pos() = 0;
 
-	if (getType() == hullSimple) {
+	if (getType() == hullSimple || getType() == hullEquation) {
 		size_type pos = cur.cell().find_last(eq);
 		MathData md(buffer_);
 		if (pos == cur.cell().size()) {
@@ -1895,7 +1895,7 @@ void InsetMathHull::doExtern(Cursor & cur, FuncRequest & func)
 			lyxerr << "use whole cell: " << md << endl;
 		} else {
 			md = MathData(buffer_, cur.cell().begin() + pos + 1, cur.cell().end());
-			lyxerr << "use partial cell form pos: " << pos << endl;
+			lyxerr << "use partial cell from pos: " << pos << endl;
 		}
 		cur.cell().append(eq);
 		cur.cell().append(pipeThroughExtern(lang, extra, md));
@@ -1903,20 +1903,6 @@ void InsetMathHull::doExtern(Cursor & cur, FuncRequest & func)
 		return;
 	}
 
-	if (getType() == hullEquation) {
-		lyxerr << "use equation inset" << endl;
-		mutate(hullEqnArray);
-		MathData & md = cur.cell();
-		lyxerr << "use cell: " << md << endl;
-		++cur.idx();
-		cur.cell() = eq;
-		++cur.idx();
-		cur.cell() = pipeThroughExtern(lang, extra, md);
-		// move to end of line
-		cur.pos() = cur.lastpos();
-		return;
-	}
-
 	{
 		lyxerr << "use eqnarray" << endl;
 		cur.idx() += 2 - cur.idx() % ncols();


More information about the lyx-cvs mailing list