From 68d825fed8f34aa98053e6264cf0668d08534549 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 29 Aug 2016 12:03:33 +0200 Subject: [PATCH] Amend b583fb26e89 It failed in the case where a selection already existed (the anchor would be wrongly reset). --- src/Text3.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Text3.cpp b/src/Text3.cpp index c6f047afb7..eafce2854c 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()) -- 2.39.2