Delete removed lines

This commit is contained in:
Matúš Púll 2025-04-09 15:22:36 +02:00
parent 5feb4bb93d
commit a867520b0b

View file

@ -95,6 +95,7 @@ public:
root = two.second;
delete two.first;
}
root = nullptr;
}
// Line insert
@ -122,7 +123,9 @@ public:
// Line removal
void remove(count_type k) {
auto two = split(root, k+1);
two.first = split(two.first, k).first;
auto first_split = split(two.first, k);
delete first_split.second;
two.first = first_split.first;
root = join(two);
}
void pop() {