]> git.lyx.org Git - lyx.git/blobdiff - src/Cursor.cpp
#9130 Text in main work area isn't rendered with high resolution
[lyx.git] / src / Cursor.cpp
index c74031555ffad047bf28bd61e1554a44f820e515..fe03a31095b83b840d79c3560e768ebbdf0ea84b 100644 (file)
@@ -1201,8 +1201,6 @@ DocIterator Cursor::selectionEnd() const
 void Cursor::setSelection()
 {
        setSelection(true);
-       // A selection with no contents is not a selection
-       // FIXME: doesnt look ok
        if (idx() == normalAnchor().idx() &&
            pit() == normalAnchor().pit() &&
            pos() == normalAnchor().pos())
@@ -2092,9 +2090,7 @@ bool Cursor::upDownInText(bool up, bool & updateNeeded)
 
                Row const & real_next_row = tm.parMetrics(pit()).rows()[next_row];
                bool bound = false;
-               pos_type const col = tm.getColumnNearX(pit(), real_next_row, 
-                                                      xo, bound);
-               top().pos() = real_next_row.pos() + col;
+               top().pos() = tm.getPosNearX(real_next_row, xo, bound);
                boundary(bound);
 
                updateNeeded |= bv().checkDepm(*this, old);