Bug: http://bugzilla.lyx.org/show_bug.cgi?id=3830

The patch should be obvious.

Stefan

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
+{
+       if (up) {
+               if (cur.idx() == 0)
+                       return false;
+               --cur.idx();
+       } else {
+               if (cur.idx() >= nargs() - 1)
+                       return false;
+               ++cur.idx();
+       }
+       cur.pos() = cell(cur.idx()).x2pos(cur.x_target());
+       return true;
+}
+
+
bool MathMacro::notifyCursorLeaves(Cursor & cur)
{
        cur.updateFlags(Update::Force);
Index: lyx-devel/src/mathed/MathMacro.h
===================================================================
--- lyx-devel.orig/src/mathed/MathMacro.h 2007-05-19 19:12:30.000000000 +0200
+++ 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;
+       ///
        virtual bool notifyCursorLeaves(Cursor &);
        ///
        docstring name() const;

Attachment: PGP.sig
Description: Signierter Teil der Nachricht

Reply via email to