commit 536cd8ecd8b4dcc8e1c95efbf4d369a146399f9c
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Sun Mar 1 00:23:07 2015 +0100
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 9d94451..4a2f2e5 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;