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, 4 insertions, 0 deletions
diff --git a/src/Selection.cxx b/src/Selection.cxx
index 0de60a958..795570ee2 100644
--- a/src/Selection.cxx
+++ b/src/Selection.cxx
@@ -96,6 +96,10 @@ bool SelectionPosition::operator >=(const SelectionPosition &other) const noexce
return *this > other;
}
+double SelectionPosition::VirtualSpaceWidth(double spaceWidth) const noexcept {
+ return static_cast<double>(virtualSpace) * spaceWidth;
+}
+
std::string SelectionPosition::ToString() const {
std::string result = std::to_string(position);
if (virtualSpace) {