commit 68d825fed8f34aa98053e6264cf0668d08534549
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Mon Aug 29 12:03:33 2016 +0200
Amend b583fb26e89
It failed in the case where a selection already existed (the anchor would
be wrongly reset).
---
src/Text3.cpp | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/Text3.cpp b/src/Text3.cpp
index c6f047a..eafce28 100644
--- a/src/Text3.cpp
+++ b/src/Text3.cpp
@@ -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())