From: Bo Peng Date: Fri, 1 Feb 2008 17:29:31 +0000 (+0000) Subject: Improve cursor movement around lines ending with break-lines X-Git-Tag: 1.6.10~6482 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=4f16565f2e68d424f411dd36843d8a1b6caac67f;p=features.git Improve cursor movement around lines ending with break-lines git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22742 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index 360b3c772a..c72ec7ae32 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -1116,9 +1116,10 @@ pos_type TextMetrics::getColumnNearX(pit_type const pit, bool const rtl = lastrow ? text_->isRTL(buffer, par) : false; if (lastrow && ((rtl && left_side && vc == row.pos() && x < tmpx - 5) || - (!rtl && !left_side && vc == end && x > tmpx + 5))) - c = end; - else if (vc == row.pos()) { + (!rtl && !left_side && vc == end && x > tmpx + 5))) { + if (!par.isNewline(end - 1)) + c = end; + } else if (vc == row.pos()) { c = bidi.vis2log(vc); if (bidi.level(c) % 2 == 1) ++c;