]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView_pimpl.C
Point fix, earlier forgotten
[lyx.git] / src / BufferView_pimpl.C
index e7c10f33fdadc5bdfab4767e7af4e855c47f581a..296b9d61d10f7db91aee1d783cdc15b43926d1bd 100644 (file)
@@ -656,7 +656,6 @@ void BufferView::Pimpl::update()
        if (bv_->getLyXText()) {
                // check needed to survive LyX startup
                bv_->getLyXText()->redoCursor();
-               fitCursor();
        }
        screen().redraw(*bv_);
 }
@@ -795,10 +794,7 @@ void BufferView::Pimpl::center()
 
        beforeChange(text);
        int const half_height = workarea().workHeight() / 2;
-       int new_y = 0;
-
-       if (text->cursor.y() > half_height)
-               new_y = text->cursor.y() - half_height;
+       int new_y = std::max(0, text->cursor.y() - half_height);
 
        // FIXME: look at this comment again ...