From 2ba263d420359bd3d529d2d32df0314b8253556d Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 16 Aug 2009 00:30:54 +0000 Subject: Always copy rectangular selections in ascending order. --- src/Editor.cxx | 8 ++++++-- src/Selection.h | 6 ++++++ 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index 3f7c9db0f..4df7c9247 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -12,6 +12,7 @@ #include #include +#include // With Borland C++ 5.5, including includes Windows.h leading to defining // FindText to FindTextA which makes calls here to Document::FindText fail. @@ -5345,8 +5346,11 @@ void Editor::CopySelectionRange(SelectionText *ss, bool allowLineCopy) { int size = sel.Length() + delimiterLength * sel.Count(); char *text = new char[size + 1]; int j = 0; - for (size_t r=0; r rangesInOrder = sel.RangesCopy(); + if (sel.selType == Selection::selRectangle) + std::sort(rangesInOrder.begin(), rangesInOrder.end()); + for (size_t r=0; r RangesCopy() const { + return ranges; + } }; #ifdef SCI_NAMESPACE -- cgit v1.2.3