From c8ec2c0a03e5420024c85c5e0d94c8774870e33a Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Sun, 28 Nov 2010 17:16:11 +0000 Subject: [PATCH] Fix bug #7088 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36557 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/InsetMathNest.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index ec01f08c29..784c378c16 100644 --- a/src/mathed/InsetMathNest.cpp +++ b/src/mathed/InsetMathNest.cpp @@ -1109,10 +1109,14 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd) if (have_l) cur.insert(MathAtom(new InsetMathBig(lname, ldelim))); - cur.niceInsert(selection); - if (have_r) + // first insert the right delimiter and then go back + // and re-insert the selection (bug 7088) + if (have_r) { cur.insert(MathAtom(new InsetMathBig(rname, rdelim))); + cur.posBackward(); + } + cur.niceInsert(selection); } // Don't call cur.undispatched() if we did nothing, this would // lead to infinite recursion via Text::dispatch(). -- 2.39.2