]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.cpp
fix "make check" with gcc 4.3
[lyx.git] / src / BufferView.cpp
index 2a5b39f48915efce7f76b1903585bc5f5466971f..3b31fd5b5f0192eeb9e0770f1d0bb35dadf1c1bf 100644 (file)
@@ -832,7 +832,7 @@ void BufferView::showCursor(DocIterator const & dit)
                if (ypos - row_dim.ascent() < 0)
                        scrolled = scrollUp(- ypos + row_dim.ascent());
                else if (ypos + row_dim.descent() > height_)
-                       scrolled = scrollDown(ypos - defaultRowHeight());
+                       scrolled = scrollDown(ypos - height_ + defaultRowHeight() ); 
 
                // else, nothing to do, the cursor is already visible so we just return.
                if (scrolled != 0) {
@@ -2453,6 +2453,8 @@ bool samePar(DocIterator const & a, DocIterator const & b)
                return true;
        if (a.empty() || b.empty())
                return false;
+       if (a.depth() != b.depth())
+               return false;
        return &a.innerParagraph() == &b.innerParagraph();
 }