Selecting text using mouse and new abstraction for cursors

This commit is contained in:
Krzosa Karol
2024-06-23 12:24:22 +02:00
parent b76d825f55
commit 37518ed7b0
2 changed files with 103 additions and 33 deletions

View File

@@ -76,6 +76,13 @@ Range GetEnd(const Buffer &buffer) {
return range;
}
Range MakeRange(int64_t a, int64_t b) {
Range result = {};
result.min = Min(a, b);
result.max = Max(a, b);
return result;
}
void AddEdit(Array<Edit> *edits, Range range, String string) {
edits->add({range, string});
}