]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.cpp
Introduce the notion of math class
[lyx.git] / src / BufferView.cpp
index a6b2ae2ac45c6a3df968beb24e2212b6a70e341e..463d0f24b8bd0864be6241217b6e0077c157059c 100644 (file)
@@ -2345,14 +2345,8 @@ int BufferView::scrollUp(int offset)
 
 bool BufferView::setCursorFromRow(int row)
 {
-       return setCursorFromRow(row, buffer_.texrow());
-}
-
-
-bool BufferView::setCursorFromRow(int row, TexRow const & texrow)
-{
-       TextEntry start, end;
-       tie(start,end) = texrow.getEntriesFromRow(row);
+       TexRow::TextEntry start, end;
+       tie(start,end) = buffer_.texrow().getEntriesFromRow(row);
        LYXERR(Debug::LATEX,
               "setCursorFromRow: for row " << row << ", TexRow has found "
               "start (id=" << start.id << ",pos=" << start.pos << "), "
@@ -2361,7 +2355,8 @@ bool BufferView::setCursorFromRow(int row, TexRow const & texrow)
 }
 
 
-bool BufferView::setCursorFromEntries(TextEntry start, TextEntry end)
+bool BufferView::setCursorFromEntries(TexRow::TextEntry start,
+                                      TexRow::TextEntry end)
 {
        DocIterator dit_start, dit_end;
        tie(dit_start,dit_end) =
@@ -2896,7 +2891,7 @@ bool BufferView::paragraphVisible(DocIterator const & dit) const
 void BufferView::cursorPosAndHeight(Point & p, int & h) const
 {
        Cursor const & cur = cursor();
-       Font const font = cur.getFont();
+       Font const font = cur.real_current_font;
        frontend::FontMetrics const & fm = theFontMetrics(font);
        int const asc = fm.maxAscent();
        int const des = fm.maxDescent();