From cc432797641e8ae3a0d22a4281f9463df65f922c Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Mon, 15 Feb 2010 02:29:03 +0000 Subject: Fix for bug #2948260 Rectangular selection expansion --- src/Editor.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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(); -- cgit v1.2.3