From 887da82073d4ab855a3ba95deaa652d475df21e2 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 16 Jan 2023 09:07:09 +1100 Subject: Use intervals for drawing. --- src/Selection.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Selection.h') diff --git a/src/Selection.h b/src/Selection.h index 4cda65d97..bc0f2208a 100644 --- a/src/Selection.h +++ b/src/Selection.h @@ -81,6 +81,12 @@ struct SelectionSegment { if (end < p) end = p; } + SelectionSegment Subtract(Sci::Position increment) const noexcept { + SelectionSegment ret(start, end); + ret.start.Add(-increment); + ret.end.Add(-increment); + return ret; + } }; struct SelectionRange { -- cgit v1.2.3