Add clipboard buffer.

This commit is contained in:
2026-08-30 19:18:26 +01:00
parent 49bf5a2e2d
commit 81bb65b7cf
11 changed files with 519 additions and 146 deletions
+4
View File
@@ -179,6 +179,8 @@ Shard *substitute(
}
uint64_t find_next(Shard *root, std::string_view pattern, uint64_t start) {
if (!root)
throw ed_error("Invalid line number.");
if (start == 0 || start > root->lines + 1)
throw ed_error("Invalid line number.");
start--;
@@ -241,6 +243,8 @@ uint64_t find_next(Shard *root, std::string_view pattern, uint64_t start) {
}
uint64_t find_prev(Shard *root, std::string_view pattern, uint64_t start) {
if (!root)
throw ed_error("Invalid line number.");
if (start == 0 || start > root->lines + 1)
throw ed_error("Invalid line number.");
start--;
-1
View File
@@ -273,7 +273,6 @@ Shard *copy(Shard *root, uint64_t start, uint64_t end) {
Shard::release(left);
Shard::release(rest);
Shard::release(right);
Shard::release(root);
return middle;
}
} // namespace bed::internal::vase