]> git.lyx.org Git - features.git/commitdiff
Fix bug 3138 (http://bugzilla.lyx.org/show_bug.cgi?id=3138).
authorAbdelrazak Younes <younes@lyx.org>
Sat, 27 Jan 2007 09:04:36 +0000 (09:04 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sat, 27 Jan 2007 09:04:36 +0000 (09:04 +0000)
* BufferView::setCursorFromScrollbar(): Reset the cursor in any case because bv_funcs::status() does not work when the cursor is within mathed.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16876 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView.C
src/bufferview_funcs.C

index 567563598fafe237fe99b41d97bdc70224e4dcf0..8c3abfb7b84b47f1e179f673753d2950354018a3 100644 (file)
@@ -500,10 +500,16 @@ void BufferView::setCursorFromScrollbar()
 
        switch (st) {
        case bv_funcs::CUR_ABOVE:
+               // We reset the cursor because bv_funcs::status() does not
+               // work when the cursor is within mathed.
+               cur.reset(buffer_->inset());
                t.setCursorFromCoordinates(cur, 0, first);
                cur.clearSelection();
                break;
        case bv_funcs::CUR_BELOW:
+               // We reset the cursor because bv_funcs::status() does not
+               // work when the cursor is within mathed.
+               cur.reset(buffer_->inset());
                t.setCursorFromCoordinates(cur, 0, last);
                cur.clearSelection();
                break;
index bb95b82e745607f834c938b471ec73334a41b366..547f94962c497187c2a68182ff851aa915e92848 100644 (file)
@@ -222,6 +222,7 @@ Point getPos(BufferView const & bv, DocIterator const & dit, bool boundary)
 
 
 // this could be used elsewhere as well?
+// FIXME: This does not work within mathed!
 CurStatus status(BufferView const * bv, DocIterator const & dit)
 {
        CoordCache::InnerParPosCache const & cache =