]> git.lyx.org Git - lyx.git/blobdiff - src/Cursor.cpp
Fix compilation warning in DepTable.cpp
[lyx.git] / src / Cursor.cpp
index 758cef9a77e9ec51fcfe28cd046492f4b6d0c004..3fd2578f272707f21a6e1e3386c21ec75ceabfe6 100644 (file)
@@ -1906,10 +1906,13 @@ bool Cursor::upDownInText(bool up, bool & updateNeeded)
                int yo = bv().getPos(*this).y_;
                Cursor old = *this;
                // To next/previous row
+               // FIXME: the y position is often guessed wrongly across styles and
+               // insets, which leads to weird behaviour.
                if (up)
                        tm.editXY(*this, xo, yo - textRow().ascent() - 1);
                else
                        tm.editXY(*this, xo, yo + textRow().descent() + 1);
+               x_target_ = old.x_target_;
                clearSelection();
 
                // This happens when you move out of an inset.