From 36d0e3032d297143687ba5a31889afd3ee0c1c5b Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 29 Aug 2016 12:03:33 +0200 Subject: [PATCH] Amend 3e432ec6314 It failed in the case where a selection already existed (the anchor would be wrongly reset). (cherry picked from commit 68d825fed8f34aa98053e6264cf0668d08534549) --- src/Text3.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Text3.cpp b/src/Text3.cpp index 4883eb82db..bfb5d7953e 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -1606,8 +1606,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.argument() == "region-select")) cur.screenUpdateFlags(Update::FitCursor); if (bvcur.wordSelection()) -- 2.39.5