]> git.lyx.org Git - lyx.git/blobdiff - src/TextMetrics.cpp
next one
[lyx.git] / src / TextMetrics.cpp
index d657e21107fd109f5d069843844beceab8772c44..dc47b425877ecfab87d432657ddfb3a138926fc2 100644 (file)
@@ -1281,7 +1281,8 @@ Row const & TextMetrics::getRowNearY(int y, pit_type pit) const
        int yy = pm.position() - pm.ascent();
        BOOST_ASSERT(!pm.rows().empty());
        RowList::const_iterator rit = pm.rows().begin();
-       RowList::const_iterator const rlast = boost::prior(pm.rows().end());
+       RowList::const_iterator rlast = pm.rows().end();
+       --rlast;
        for (; rit != rlast; yy += rit->height(), ++rit)
                if (yy + rit->height() > y)
                        break;