X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2Fmath_cursor.C;h=6a371a2a9b121baa0c54a7a1e87c38fa037328db;hb=6ac158896b7a49e045be870ab0e0f054a0ab2da2;hp=17d7d16c32add59e5db6084ab1e604dffd471020;hpb=42d9dbd0e5b502846a26556c83cb7366d6ac53e9;p=lyx.git diff --git a/src/mathed/math_cursor.C b/src/mathed/math_cursor.C index 17d7d16c32..6a371a2a9b 100644 --- a/src/mathed/math_cursor.C +++ b/src/mathed/math_cursor.C @@ -670,12 +670,22 @@ void MathCursor::handleNest(MathAtom const & a) } -void MathCursor::getPos(int & x, int & y) +void MathCursor::getPos(int & x, int & y) const { par()->getPos(idx(), pos(), x, y); } +int MathCursor::targetX() const +{ + if (targetx_ != -1) + return targetx_; + int x = 0, y = 0; + getPos(x, y); + return x; +} + + MathInset * MathCursor::par() const { return cursor().par_;