aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2010-02-15 02:29:03 +0000
committernyamatongwe <unknown>2010-02-15 02:29:03 +0000
commit8091767c3cc3dddc0d391328412a1342202ee41b (patch)
tree767947433bfa4258235cb853ea0738b7f0a55567 /src/Editor.cxx
parente9528b189e7da970d79f4f5c7f7b0b833b2457ec (diff)
downloadscintilla-mirror-8091767c3cc3dddc0d391328412a1342202ee41b.tar.gz
Fix for bug #2948260 Rectangular selection expansion
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 9ec5994f9..d9ffb3ee0 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -850,6 +850,12 @@ int Editor::MovePositionTo(SelectionPosition newPos, Selection::selTypes selt, b
int delta = newPos.Position() - sel.MainCaret();
newPos = ClampPositionIntoDocument(newPos);
newPos = MovePositionOutsideChar(newPos, delta);
+ if (!multipleSelection && sel.IsRectangular() && (selt == Selection::selStream)) {
+ // Can't turn into multiple selection so clear additional selections
+ InvalidateSelection(SelectionRange(newPos), true);
+ SelectionRange rangeMain = sel.RangeMain();
+ sel.SetSelection(rangeMain);
+ }
if (!sel.IsRectangular() && (selt == Selection::selRectangle)) {
// Switching to rectangular
SelectionRange rangeMain = sel.RangeMain();