aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
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
commit34f536937739b4c9a1e0c4aae611d3dc5f3be4db (patch)
tree9ffafa3d5ba04f27baf1a122904bea61ebe6095d /src
parentbd3e5a3953b407b6171875a82e91ddaa0ea94ab6 (diff)
downloadscintilla-mirror-34f536937739b4c9a1e0c4aae611d3dc5f3be4db.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.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);