Fix out of bounds issue when using the Delete key

Signed-off-by: AnErrupTion <anerruption@disroot.org>
pull/603/head
AnErrupTion 2 weeks ago
parent 5a9cc881fe
commit 629749b383
No known key found for this signature in database
GPG Key ID: 3E85EB44F610AD7F

@ -118,6 +118,8 @@ fn goRight(self: *Text) void {
}
fn delete(self: *Text) void {
if (self.cursor >= self.end) return;
_ = self.text.orderedRemove(self.cursor);
self.end -= 1;

Loading…
Cancel
Save