aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Selection.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Selection.cxx')
-rw-r--r--src/Selection.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Selection.cxx b/src/Selection.cxx
index 20fb1efca..527a9d29a 100644
--- a/src/Selection.cxx
+++ b/src/Selection.cxx
@@ -327,7 +327,7 @@ SelectionRange Selection::RectangularCopy() const noexcept {
SelectionSegment Selection::Limits() const noexcept {
PLATFORM_ASSERT(!ranges.empty());
- SelectionSegment sr(ranges[0].anchor, ranges[0].caret);
+ SelectionSegment sr = ranges[0].AsSegment();
for (size_t i=1; i<ranges.size(); i++) {
sr.Extend(ranges[i].anchor);
sr.Extend(ranges[i].caret);
@@ -339,7 +339,7 @@ SelectionSegment Selection::LimitsForRectangularElseMain() const noexcept {
if (IsRectangular()) {
return Limits();
} else {
- return SelectionSegment(ranges[mainRange].caret, ranges[mainRange].anchor);
+ return ranges[mainRange].AsSegment();
}
}