]> git.lyx.org Git - features.git/commitdiff
Set cursor properly after double/triple click in mathed
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 12 Jun 2017 16:00:43 +0000 (18:00 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 12 Jun 2017 16:02:39 +0000 (18:02 +0200)
Without this setCurrentFont() is not correctly called on the
BufferView cursor and the cursor could appear in L-form.

Fixes bug #10686.

src/mathed/InsetMathNest.cpp

index 596e32aa006e9e2ddb413732fb77a2147cbdf7c9..993b6fc0fe1fb44aa773c3385d1362169b905077 100644 (file)
@@ -735,20 +735,18 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_MOUSE_DOUBLE:
        case LFUN_WORD_SELECT:
                cur.pos() = 0;
-               cur.resetAnchor();
-               cur.selection(true);
+               cur.bv().mouseSetCursor(cur);
                cur.pos() = cur.lastpos();
-               cur.bv().cursor() = cur;
+               cur.bv().mouseSetCursor(cur, true);
                break;
 
        case LFUN_MOUSE_TRIPLE:
                cur.idx() = 0;
                cur.pos() = 0;
-               cur.resetAnchor();
-               cur.selection(true);
+               cur.bv().mouseSetCursor(cur);
                cur.idx() = cur.lastidx();
                cur.pos() = cur.lastpos();
-               cur.bv().cursor() = cur;
+               cur.bv().mouseSetCursor(cur, true);
                break;
 
        case LFUN_LINE_BEGIN: