From: Jean-Marc Lasgouttes Date: Mon, 12 Jun 2017 16:00:43 +0000 (+0200) Subject: Set cursor properly after double/triple click in mathed X-Git-Tag: 2.3.0beta1~253 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5d7dae9e382f0b01800f5652e673e12fa6923740;p=features.git Set cursor properly after double/triple click in mathed Without this setCurrentFont() is not correctly called on the BufferView cursor and the cursor could appear in L-form. Fixes bug #10686. --- diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index 596e32aa00..993b6fc0fe 100644 --- a/src/mathed/InsetMathNest.cpp +++ b/src/mathed/InsetMathNest.cpp @@ -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: