From f8d3a96296b898cbca5faf1e326b3a3b0d162672 Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 5 Feb 2025 20:19:18 +1100 Subject: Use new SelectionSegment constructor and SelectionRange::AsSegment to simplify code. --- src/Selection.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Selection.cxx') 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