]> git.lyx.org Git - lyx.git/blobdiff - src/Row.cpp
Account for old versions of Pygments
[lyx.git] / src / Row.cpp
index 3557957a77a8d79ea77fb7d35925b5b636ef54e0..8d89f64e1c06f17af0e315faecbab718889f4da3 100644 (file)
@@ -115,7 +115,7 @@ 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() / 2) {
+               if (x > (full_width() + 1) / 2) {
                        x = int(full_width());
                        i = !isRTL();
                } else {