From 1cc39b2c7bc22ae8aaddefd382c621474732b8c1 Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 25 Apr 2017 08:27:13 +1000 Subject: Bug [#1940]. Canceling modes with the Esc key preserves a rectangular selection. --- doc/ScintillaHistory.html | 4 ++++ src/Editor.cxx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 496892db3..b4e940689 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -560,6 +560,10 @@ Bug #1931.
  • + Canceling modes with the Esc key preserves a rectangular selection. + Bug #1940. +
  • +
  • On Cocoa, a leak of mouse tracking areas was fixed.
  • diff --git a/src/Editor.cxx b/src/Editor.cxx index 35c8a8d6b..5330ea45b 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3745,7 +3745,7 @@ int Editor::KeyCommand(unsigned int iMessage) { case SCI_CANCEL: // Cancel any modes - handled in subclass // Also unselect text CancelModes(); - if (sel.Count() > 1) { + if ((sel.Count() > 1) && !sel.IsRectangular()) { // Drop additional selections InvalidateWholeSelection(); sel.DropAdditionalRanges(); -- cgit v1.2.3