]> git.lyx.org Git - features.git/blobdiff - src/Row.cpp
Row::Element::x2pos: go to nearest point also over insets
[features.git] / src / Row.cpp
index 70e3dcafc3ac3683d72d4d9555e2b7a59df19fc3..3557957a77a8d79ea77fb7d35925b5b636ef54e0 100644 (file)
@@ -115,14 +115,13 @@ pos_type Row::Element::x2pos(int &x) const
        case SPACE:
                // those elements contain only one position. Round to
                // the closest side.
-               if (x > full_width()) {
+               if (x > full_width() / 2) {
                        x = int(full_width());
                        i = !isRTL();
                } else {
                        x = 0;
                        i = isRTL();
                }
-
        }
        //lyxerr << "=> p=" << pos + i << " x=" << x << endl;
        return pos + i;