From 60e0be1d49d4ba0e093a28bd3c2039f0c1ef8344 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 29 Oct 2023 09:25:20 +1100 Subject: Bug [#2078]. Fix rectangular selections with SCI_MOVESELECTEDLINESUP and SCI_MOVESELECTEDLINESDOWN. --- src/Editor.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index ade5094f7..796279871 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -980,7 +980,10 @@ void Editor::VerticalCentreCaret() { void Editor::MoveSelectedLines(int lineDelta) { if (sel.IsRectangular()) { - return; + // Convert to stream selection + const SelectionRange rangeRectangular = sel.Rectangular(); + sel.Clear(); + sel.SetSelection(rangeRectangular); } // if selection doesn't start at the beginning of the line, set the new start -- cgit v1.2.3