]> git.lyx.org Git - lyx.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>
Thu, 15 Jun 2017 08:21:18 +0000 (10:21 +0200)
Without this setCurrentFont() is not correctly called on the
BufferView cursor and the cursor could appear in L-form.

Fixes bug #10686.

(cherry picked from commit 5d7dae9e382f0b01800f5652e673e12fa6923740)

src/mathed/InsetMathNest.cpp
status.22x

index 52524c70c6a9c5c403c95c5e643dea6f5afcc5df..fc7690dc7a73364c11ba09a1c077aace0c3c7e48 100644 (file)
@@ -753,20 +753,18 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_MOUSE_DOUBLE:
        case LFUN_WORD_SELECT:
                cur.pos() = 0;
-               cur.resetAnchor();
-               cur.setSelection(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.setSelection(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_PARAGRAPH_UP:
index 85f029083727b745ca160093a8f58296c3f5069f..6b90ee133c84f729823c540256b08f7f5c789a0a 100644 (file)
@@ -69,7 +69,10 @@ What's new
 
 - Fix glacial performance with ancient Hebrew text on macOS.
 
-- Fix hole in selection for some zoom and justification values (bug 8883).
+- Fix hole in selection for some zoom and justification values (bug
+  8883).
+
+- Fix cursor state after double/triple click in mathed (bug #10686).
 
 - Fix potential crash when cursor enters an inset (bug 10691).