branch: Fix bug #2034: Inconsistent behavior of cursor inside mathed.

When closing the macromode, do the same trick as in lines 835--838.

see r29686

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30492 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-07-11 17:57:25 +00:00
parent 4abaf35bad
commit 059d5ee830
2 changed files with 9 additions and 1 deletions

View File

@ -1508,7 +1508,13 @@ bool InsetMathNest::interpretChar(Cursor & cur, char_type c)
}
// leave macro mode and try again if necessary
cur.macroModeClose();
if (cur.macroModeClose()) {
MathAtom const atom = cur.prevAtom();
if (atom->asNestInset() && atom->isActive()) {
cur.posBackward();
cur.pushBackward(*cur.nextInset());
}
}
if (c == '{')
cur.niceInsert(MathAtom(new InsetMathBrace));
else if (c != ' ')

View File

@ -187,6 +187,8 @@ What's new
- Fix display of macros when clicking away (bug 3706).
- Fix the inconsistent behaviour of the cursor inside math (bug 2034).
* DOCUMENTATION AND LOCALIZATION