Works for me (when leaving the macro using down key, macro collapses). I don't have the first part of the patch in, though, so down doesn't move to the second parameter, but directly out --- but that's to be expected, right?
Thanks for testing! You are right. I have split the two (in fact independent) parts. The second one is here.
Stefan Index: lyx-devel/src/mathed/MathMacro.cpp ===================================================================--- lyx-devel.orig/src/mathed/MathMacro.cpp 2007-06-13 08:30:09.000000000 +0200 +++ lyx-devel/src/mathed/MathMacro.cpp 2007-06-13 08:36:56.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-06-13 08:30:09.000000000 +0200
+++ lyx-devel/src/mathed/MathMacro.h 2007-06-13 08:36:56.000000000 +0200 @@ -48,6 +48,8 @@/// target pos when we enter the inset from the right by pressing "Left"
bool idxLast(Cursor &) const; /// + bool idxUpDown(Cursor & cur, bool up) const; + /// virtual bool notifyCursorLeaves(Cursor &); /// docstring name() const;
macroupdown.patch
Description: Binary data
PGP.sig
Description: Signierter Teil der Nachricht