Add clipboard buffer.
This commit is contained in:
@@ -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--;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user