mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
* up/down jumps between macro parameters
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18774 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
98fb638d61
commit
d0d7d0103a
@ -254,6 +254,22 @@ bool MathMacro::idxLast(Cursor & cur) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool MathMacro::idxUpDown(Cursor & cur, bool up) const
|
||||||
|
{
|
||||||
|
if (up) {
|
||||||
|
if (cur.idx() == 0)
|
||||||
|
return false;
|
||||||
|
--cur.idx();
|
||||||
|
} else {
|
||||||
|
if (cur.idx() + 1 >= nargs())
|
||||||
|
return false;
|
||||||
|
++cur.idx();
|
||||||
|
}
|
||||||
|
cur.pos() = cell(cur.idx()).x2pos(cur.x_target());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool MathMacro::notifyCursorLeaves(Cursor & cur)
|
bool MathMacro::notifyCursorLeaves(Cursor & cur)
|
||||||
{
|
{
|
||||||
cur.updateFlags(Update::Force);
|
cur.updateFlags(Update::Force);
|
||||||
|
@ -48,6 +48,8 @@ public:
|
|||||||
/// target pos when we enter the inset from the right by pressing "Left"
|
/// target pos when we enter the inset from the right by pressing "Left"
|
||||||
bool idxLast(Cursor &) const;
|
bool idxLast(Cursor &) const;
|
||||||
///
|
///
|
||||||
|
bool idxUpDown(Cursor & cur, bool up) const;
|
||||||
|
///
|
||||||
virtual bool notifyCursorLeaves(Cursor &);
|
virtual bool notifyCursorLeaves(Cursor &);
|
||||||
///
|
///
|
||||||
docstring name() const;
|
docstring name() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user