commit 4f3c3a794e36c3f53373ccdbd63c923660b892ff
Author: Guillaume Munch <[email protected]>
Date: Sun Mar 19 14:41:54 2017 +0100
repair Cursor::x_target mechanism (#10168)
---
src/Cursor.cpp | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/Cursor.cpp b/src/Cursor.cpp
index 758cef9..3fd2578 100644
--- a/src/Cursor.cpp
+++ b/src/Cursor.cpp
@@ -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.