]> git.lyx.org Git - lyx.git/blobdiff - src/Text3.cpp
Avoid duplicating mode changing commands
[lyx.git] / src / Text3.cpp
index c6f047afb705f494c9f2c8ec46105641c43eaf16..eafce2854c2efdb308b9550a4a382a8a58439702 100644 (file)
@@ -1607,8 +1607,9 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                bvcur.setMark(false);
                switch (cmd.button()) {
                case mouse_button::button1:
-                       // Set the cursor
-                       bvcur.resetAnchor();
+                       if (!bvcur.selection())
+                               // Set the cursor
+                               bvcur.resetAnchor();
                        if (!bv->mouseSetCursor(cur, cmd.modifier() == ShiftModifier))
                                cur.screenUpdateFlags(Update::SinglePar | Update::FitCursor);
                        if (bvcur.wordSelection())