On Tue, Dec 20, 2005 at 12:05:40AM +0200, Martin Vermeer wrote: > On Mon, Dec 19, 2005 at 10:49:08PM +0100, Andre Poenitz wrote: > > On Mon, Dec 19, 2005 at 05:39:42PM +0100, Jean-Marc Lasgouttes wrote: > > > >>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > > > > Martin> Confirmed. This problem happens if you try to to type LaTeX > > > Martin> directly. It works correctly from the panel. > > > > > > The following patch seems to fix the bug. > > > > > > André, can you ack that this is correct? > > > > dicpatch() is a bit heavy in this depth (it can have all sort of side > > effects), so I'd personally prefer calling a direct method. > > > > But if you have checked it works, it is fine with me. > > The following is perhaps lighter, and could be considered an alternative > if there are side effects. (But this may have such as well.) > > - Martin
> Index: math_nestinset.C > =================================================================== > RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_nestinset.C,v > retrieving revision 1.179 > diff -u -p -r1.179 math_nestinset.C > --- math_nestinset.C 2 Dec 2005 06:34:19 -0000 1.179 > +++ math_nestinset.C 19 Dec 2005 21:35:29 -0000 > @@ -1129,8 +1129,14 @@ bool MathNestInset::interpret(LCursor & > return true; > } > > - // leave macro mode and try again if necessary > - cur.macroModeClose(); > + // Route the accumulated macro name through INSERT_MATH for > + // cursor positioning: > + FuncRequest cmd = FuncRequest(LFUN_INSERT_MATH, > cur.macroName()); > + MathUnknownInset * p = cur.activeMacro(); > + if (p) > + p->setName("\\"); > + MathNestInset::doDispatch(cur, cmd); > + // Try again if necessary > if (c == '{') > cur.niceInsert(MathAtom(new MathBraceInset)); > else if (c != ' ') What's the actual cursor positioning problem? I'd really like to get that fixed by direct calls. Something like if (cur.nextAtom()->nargs() > 0) edit(cur, true); or some call to idxFirst... Andre'