]> git.lyx.org Git - features.git/commitdiff
In mathed, only select current cell on double-click
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 14 Mar 2016 14:14:57 +0000 (15:14 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 16 Mar 2016 09:23:23 +0000 (10:23 +0100)
Keep the behavior of split selection with triple click.

Fixes part of #9747. The remainder was fixed at f58d9f27, AFAICS.

src/mathed/InsetMathNest.cpp

index 90007c072ea3f41d15c0509a9f2a3b565c4aaa68..493f529d1e8c774606fed3fddb719d6fad7d6ca8 100644 (file)
@@ -735,10 +735,17 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
        }
 
        case LFUN_MOUSE_DOUBLE:
-       case LFUN_MOUSE_TRIPLE:
        case LFUN_WORD_SELECT:
                cur.pos() = 0;
+               cur.resetAnchor();
+               cur.setSelection(true);
+               cur.pos() = cur.lastpos();
+               cur.bv().cursor() = cur;
+               break;
+
+       case LFUN_MOUSE_TRIPLE:
                cur.idx() = 0;
+               cur.pos() = 0;
                cur.resetAnchor();
                cur.setSelection(true);
                cur.idx() = cur.lastidx();