[LyX/master] Fix undo with cell-plit

Jean-Marc Lasgouttes lasgouttes at lyx.org
Fri Apr 21 11:38:52 UTC 2023


commit f7afcc31feaff19fcc97ffe45453e450218ae31d
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date:   Fri Apr 21 14:42:51 2023 +0200

    Fix undo with cell-plit
    
    This function modifies several cells.
    
    Fixes bug #12746.
---
 src/mathed/InsetMathGrid.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mathed/InsetMathGrid.cpp b/src/mathed/InsetMathGrid.cpp
index 65cd662..3adec0c 100644
--- a/src/mathed/InsetMathGrid.cpp
+++ b/src/mathed/InsetMathGrid.cpp
@@ -1413,7 +1413,8 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
 		break;
 
 	case LFUN_CELL_SPLIT:
-		cur.recordUndo();
+		// undo needs to cover two cells
+		cur.recordUndoInset();
 		splitCell(cur);
 		break;
 


More information about the lyx-cvs mailing list