From 536cd8ecd8b4dcc8e1c95efbf4d369a146399f9c Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Sun, 1 Mar 2015 00:23:07 +0100 Subject: [PATCH] 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. --- src/Row.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.39.2