From a14f5340b58421aa8a107deca0eefabe5de5d3fd Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 15 Nov 2019 09:25:29 +1100 Subject: Backport: Feature [feature-requests:#1316] Allow target to have virtual space. Backport of changeset 7768:5d73aa55a6ee. --- src/Selection.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Selection.h') diff --git a/src/Selection.h b/src/Selection.h index d078c043e..11a6f097a 100644 --- a/src/Selection.h +++ b/src/Selection.h @@ -72,6 +72,9 @@ struct SelectionSegment { bool Empty() const noexcept { return start == end; } + Sci::Position Length() const noexcept { + return end.Position() - start.Position(); + } void Extend(SelectionPosition p) noexcept { if (start > p) start = p; -- cgit v1.2.3