From c492f22593deaaf85cc47b60818f2d5c7c62ce41 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 12 Jun 2017 18:00:43 +0200 Subject: [PATCH] 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. (cherry picked from commit 5d7dae9e382f0b01800f5652e673e12fa6923740) --- src/mathed/InsetMathNest.cpp | 10 ++++------ status.22x | 5 ++++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index 52524c70c6..fc7690dc7a 100644 --- a/src/mathed/InsetMathNest.cpp +++ b/src/mathed/InsetMathNest.cpp @@ -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: diff --git a/status.22x b/status.22x index 85f0290837..6b90ee133c 100644 --- a/status.22x +++ b/status.22x @@ -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). -- 2.39.5