mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
repair Cursor::x_target mechanism (#10168)
This commit is contained in:
parent
ac6d3ffb6a
commit
4f3c3a794e
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user