diff options
| author | Neil <nyamatongwe@gmail.com> | 2019-11-15 09:25:29 +1100 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2019-11-15 09:25:29 +1100 |
| commit | a14f5340b58421aa8a107deca0eefabe5de5d3fd (patch) | |
| tree | e12b5cd84619b36ed299d669968a0a7717a8c131 /src/Selection.h | |
| parent | 3b72fe93906e4c6b8c800cf2c7b986bc2c2c89a2 (diff) | |
| download | scintilla-mirror-a14f5340b58421aa8a107deca0eefabe5de5d3fd.tar.gz | |
Backport: Feature [feature-requests:#1316] Allow target to have virtual space.
Backport of changeset 7768:5d73aa55a6ee.
Diffstat (limited to 'src/Selection.h')
| -rw-r--r-- | src/Selection.h | 3 |
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; |
