From: Jean-Marc Lasgouttes Date: Sat, 28 Feb 2015 23:23:07 +0000 (+0100) Subject: Fix cursor position before a virtual element X-Git-Tag: 2.2.0alpha1~1253 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=536cd8ecd8b4dcc8e1c95efbf4d369a146399f9c;p=features.git Fix cursor position before a virtual element When there is a virtual element like an end-of-paragraph marker, the cursor should be on the left (in RTL text). This problem was created by 46ee6799. --- diff --git a/src/Row.cpp b/src/Row.cpp index 9d94451684..4a2f2e5848 100644 --- a/src/Row.cpp +++ b/src/Row.cpp @@ -47,7 +47,8 @@ double Row::Element::pos2x(pos_type const i) const double w = 0; //handle first the two bounds of the element - if (i == endpos && !(inset && inset->lyxCode() == SEPARATOR_CODE)) + if (i == endpos && type != VIRTUAL + && !(inset && inset->lyxCode() == SEPARATOR_CODE)) w = rtl ? 0 : full_width(); else if (i == pos || type != STRING) w = rtl ? full_width() : 0;