aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Selection.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Selection.h')
-rw-r--r--src/Selection.h3
1 files changed, 3 insertions, 0 deletions
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;