]> git.lyx.org Git - lyx.git/blobdiff - src/Row.cpp
Account for old versions of Pygments
[lyx.git] / src / Row.cpp
index 70e3dcafc3ac3683d72d4d9555e2b7a59df19fc3..8d89f64e1c06f17af0e315faecbab718889f4da3 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() + 1) / 2) {
                        x = int(full_width());
                        i = !isRTL();
                } else {
                        x = 0;
                        i = isRTL();
                }
-
        }
        //lyxerr << "=> p=" << pos + i << " x=" << x << endl;
        return pos + i;