]> git.lyx.org Git - lyx.git/blobdiff - src/TextMetrics.cpp
Tweaks.
[lyx.git] / src / TextMetrics.cpp
index 360b3c772abf703f4075d20557e219641bd591fc..c72ec7ae32be85068768ea9ade01cfa42de4975a 100644 (file)
@@ -1116,9 +1116,10 @@ pos_type TextMetrics::getColumnNearX(pit_type const pit,
        bool const rtl = lastrow ? text_->isRTL(buffer, par) : false;
        if (lastrow &&
            ((rtl  &&  left_side && vc == row.pos() && x < tmpx - 5) ||
-            (!rtl && !left_side && vc == end  && x > tmpx + 5)))
-               c = end;
-       else if (vc == row.pos()) {
+            (!rtl && !left_side && vc == end  && x > tmpx + 5))) {
+               if (!par.isNewline(end - 1))
+                       c = end;
+       } else if (vc == row.pos()) {
                c = bidi.vis2log(vc);
                if (bidi.level(c) % 2 == 1)
                        ++c;