aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authorNeil Hodgson <nyamatongwe@gmail.com>2015-06-13 19:53:02 +1000
committerNeil Hodgson <nyamatongwe@gmail.com>2015-06-13 19:53:02 +1000
commitf1bd8d5f4ac8a741df0b10000f09345752f6e6af (patch)
treeda29ae10201a014476f9c956ddaf66d69ae50601 /src/Editor.cxx
parenta54e02fd8201bffbfe6e09835894f9b07ae0fc78 (diff)
downloadscintilla-mirror-f1bd8d5f4ac8a741df0b10000f09345752f6e6af.tar.gz
Fix bug where maximum two selections possible at once with Ctrl+click due
to change in CancelModes.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index beb270219..678f2e927 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -2948,12 +2948,6 @@ void Editor::Duplicate(bool forLine) {
void Editor::CancelModes() {
sel.SetMoveExtends(false);
- if (sel.Count() > 1) {
- // Drop additional selections
- const SelectionRange rangeOnly = sel.RangeMain();
- InvalidateSelection(rangeOnly, true);
- sel.SetSelection(rangeOnly);
- }
}
void Editor::NewLine() {
@@ -3344,6 +3338,12 @@ int Editor::KeyCommand(unsigned int iMessage) {
case SCI_CANCEL: // Cancel any modes - handled in subclass
// Also unselect text
CancelModes();
+ if (sel.Count() > 1) {
+ // Drop additional selections
+ const SelectionRange rangeOnly = sel.RangeMain();
+ InvalidateSelection(rangeOnly, true);
+ sel.SetSelection(rangeOnly);
+ }
break;
case SCI_DELETEBACK:
DelCharBack(true);