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.
This commit is contained in:
Jean-Marc Lasgouttes 2015-03-01 00:23:07 +01:00
parent 3e9e6e344a
commit 536cd8ecd8

View File

@ -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;