aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 78b1845db..2c7c2e5a2 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -4147,9 +4147,8 @@ void Editor::CopySelectionRange(SelectionText *ss, bool allowLineCopy) {
std::vector<SelectionRange> rangesInOrder = sel.RangesCopy();
if (sel.selType == Selection::selRectangle)
std::sort(rangesInOrder.begin(), rangesInOrder.end());
- for (size_t r=0; r<rangesInOrder.size(); r++) {
- const SelectionRange current = rangesInOrder[r];
- text.append(RangeText(current.Start().Position(), current.End().Position()));
+ for (const SelectionRange &current : rangesInOrder) {
+ text.append(RangeText(current.Start().Position(), current.End().Position()));
if (sel.selType == Selection::selRectangle) {
if (pdoc->eolMode != SC_EOL_LF)
text.push_back('\r');