diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 676d68c9dc..749c44d56b 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,9 @@ + +2005-08-19 Martin Vermeer + + * math_nestinset.C (doDispatch): fix crash when deleting across rows + in math array, and block multi-cell cut/copy leading to data loss + 2005-07-26 Georg Baum * math_factory.C (initSymbols): Don't require wasysym for the wasy diff --git a/src/mathed/math_nestinset.C b/src/mathed/math_nestinset.C index a71327a84e..245055ef9e 100644 --- a/src/mathed/math_nestinset.C +++ b/src/mathed/math_nestinset.C @@ -423,6 +423,7 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd) } case LFUN_CUT: + cur.pos() = 0; // Prevent stale position >= size crash cutSelection(cur, true, true); cur.message(_("Cut")); break; @@ -814,7 +815,9 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd) if (rs.empty()) rs = ')'; recordUndo(cur, Undo::ATOMIC); - cur.handleNest(MathAtom(new MathDelimInset(ls, rs))); + // Don't do this with multi-cell selections + if (cur.selBegin().idx() == cur.selEnd().idx()) + cur.handleNest(MathAtom(new MathDelimInset(ls, rs))); break; }