diff options
author | Neil Hodgson <nyamatongwe@gmail.com> | 2015-06-13 19:53:02 +1000 |
---|---|---|
committer | Neil Hodgson <nyamatongwe@gmail.com> | 2015-06-13 19:53:02 +1000 |
commit | f1bd8d5f4ac8a741df0b10000f09345752f6e6af (patch) | |
tree | da29ae10201a014476f9c956ddaf66d69ae50601 /src | |
parent | a54e02fd8201bffbfe6e09835894f9b07ae0fc78 (diff) | |
download | scintilla-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')
-rw-r--r-- | src/Editor.cxx | 12 |
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); |