From f1bd8d5f4ac8a741df0b10000f09345752f6e6af Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Sat, 13 Jun 2015 19:53:02 +1000 Subject: Fix bug where maximum two selections possible at once with Ctrl+click due to change in CancelModes. --- src/Editor.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') 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); -- cgit v1.2.3