commit 637292d737f45ac7094bc50a9f6e4509fedf079b
Author: Juergen Spitzmueller <[email protected]>
Date: Sun Jan 25 13:18:58 2026 +0100
Fix pasting of partial math grids (#13277)
---
src/mathed/InsetMathGrid.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/mathed/InsetMathGrid.cpp b/src/mathed/InsetMathGrid.cpp
index 55c5355b9e..a0b36ab565 100644
--- a/src/mathed/InsetMathGrid.cpp
+++ b/src/mathed/InsetMathGrid.cpp
@@ -1582,8 +1582,10 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest
& cmd)
}
InsetMathGrid grid(buffer_, 1, 1);
if (!topaste.empty())
+ // Note that the parser errors on partial grids ending
with \\.
+ // We thus strip this
if ((topaste.size() == 1 && isAscii(topaste))
- || !mathed_parse_normal(grid, topaste, parseflg)) {
+ || !mathed_parse_normal(grid, rtrim(topaste,
"\\\\"), parseflg)) {
resetGrid(grid);
mathed_parse_normal(grid, topaste, parseflg |
Parse::VERBATIM);
}
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs