aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2010-02-15 02:29:03 +0000
committernyamatongwe <devnull@localhost>2010-02-15 02:29:03 +0000
commitcc432797641e8ae3a0d22a4281f9463df65f922c (patch)
tree767947433bfa4258235cb853ea0738b7f0a55567 /src
parent192d111cd4f8154523e8c5795badfcc9141dba9d (diff)
downloadscintilla-mirror-cc432797641e8ae3a0d22a4281f9463df65f922c.tar.gz
Fix for bug #2948260 Rectangular selection expansion
Diffstat (limited to 'src')
-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();