aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2017-04-25 08:27:13 +1000
committerNeil <nyamatongwe@gmail.com>2017-04-25 08:27:13 +1000
commit1cc39b2c7bc22ae8aaddefd382c621474732b8c1 (patch)
tree71398ba352a99b123b75e0b7fb41287e7c5094de
parent2a8dca4afaa7e95260350a524131ae7961bbec7c (diff)
downloadscintilla-mirror-1cc39b2c7bc22ae8aaddefd382c621474732b8c1.tar.gz
Bug [#1940]. Canceling modes with the Esc key preserves a rectangular selection.
-rw-r--r--doc/ScintillaHistory.html4
-rw-r--r--src/Editor.cxx2
2 files changed, 5 insertions, 1 deletions
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 @@
<a href="http://sourceforge.net/p/scintilla/bugs/1931/">Bug #1931</a>.
</li>
<li>
+ Canceling modes with the Esc key preserves a rectangular selection.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1940/">Bug #1940</a>.
+ </li>
+ <li>
On Cocoa, a leak of mouse tracking areas was fixed.
</li>
<li>
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();