diff --git a/src/Text2.cpp b/src/Text2.cpp index 527e32f189..64da062163 100644 --- a/src/Text2.cpp +++ b/src/Text2.cpp @@ -998,8 +998,8 @@ bool Text::cursorUp(Cursor & cur) // handling when the cursor is at the end of line: Use the new // x-target only if the old one was before the end of line. if (cur.pos() != pm.rows()[row].endpos() - || (!cur.isRTL() && x < cur.targetX()) - || (cur.isRTL() && x > cur.targetX())) { + || (!reverseDirectionNeeded(cur) && x < cur.targetX()) + || (reverseDirectionNeeded(cur) && x > cur.targetX())) { x = cur.targetX(); }