From: Martin Vermeer Date: Mon, 20 Mar 2006 08:42:43 +0000 (+0000) Subject: * math_nestinset.C X-Git-Tag: 1.6.10~13479 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0a57bcafeb3417d84e232c814203dc1fdf500c40;p=features.git * math_nestinset.C (MathNestInset::doDispatch): fix bug 2345: C-M on text in math gives an empty mbox git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13425 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/math_nestinset.C b/src/mathed/math_nestinset.C index 3d54c3f35b..f232a6ecec 100644 --- a/src/mathed/math_nestinset.C +++ b/src/mathed/math_nestinset.C @@ -798,11 +798,13 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd) if (currentMode() == InsetBase::MATH_MODE && cmd.argument == "on") break; cur.macroModeClose(); + safe_ = grabAndEraseSelection(cur); selClearOrDel(cur); //cur.plainInsert(MathAtom(new MathMBoxInset(cur.bv()))); cur.plainInsert(MathAtom(new MathBoxInset("mbox"))); cur.posLeft(); cur.pushLeft(*cur.nextInset()); + cur.niceInsert(safe_); #else if (currentMode() == InsetBase::TEXT_MODE) { cur.niceInsert(MathAtom(new MathHullInset("simple")));