On Mon, Jun 11, 2007 at 08:32:44PM +0200, Stefan Schimanski wrote:
> >Index: lyx-devel/src/mathed/MathMacro.cpp
> >===================================================================
> >--- lyx-devel.orig/src/mathed/MathMacro.cpp  2007-06-02  
> >11:24:05.000000000 +0200
> >+++ lyx-devel/src/mathed/MathMacro.cpp       2007-06-09  
> >18:24:35.000000000 +0200
> >@@ -254,6 +254,22 @@
> >}
> >+bool MathMacro::idxUpDown(Cursor & cur, bool up) const

There seem to be two empty lines missing above this line

[...]

> >+            if (cur.idx() >= nargs() - 1)

        if (cur.idx() + 1 >= nargs())

puts you on the safe side of signed/unsigned issues, and given
that we always (should) have  cur.idx() < nargs() this is 
equivalent to

        if (cur.idx() + 1 == nargs())

I understand that the >= is more 'robust' but
I prefer fast crashs in this case...

> >+++ lyx-devel/src/mathed/MathMacro.h 2007-06-09 18:14:31.000000000  
> >+0200
> >@@ -48,6 +48,8 @@
> >     /// target pos when we enter the inset from the right by pressing  
> >"Left"
> >     bool idxLast(Cursor &) const;
> >     ///
> >+    bool MathMacro::idxUpDown(Cursor & cur, bool up) const;
> >+    ///

And this MathMacro:: qualification is useless at best, but I have a
strong suspicion that it is not allowed at all.

Apart form that: Ok if it works.

Andre'

PS: I seem to remember to have something like that as 'generic'
implementation in InsetMathNest. I wonder where this went... [Not your
doing I suppose...]

Reply via email to