aboutsummaryrefslogtreecommitdiff
path: root/src/types.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/types.cpp')
-rw-r--r--src/types.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/types.cpp b/src/types.cpp
index f4423ba69..7c4e47f12 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -336,6 +336,14 @@ Selection selection_combine(Selection const &lhs, Selection const &rhs) {
return new_sel;
}
+Selection sub_selection(Selection const &sel, isize offset) {
+ Selection res = {};
+ res.index.data = sel.index.data + offset;
+ res.index.count = sel.index.count - offset;
+ res.index.capacity = res.index.count;
+ return res;
+}
+
gb_global Type basic_types[] = {