diff --git a/src/tui/components/Text.zig b/src/tui/components/Text.zig index 22c0fc4..fe8b0d1 100644 --- a/src/tui/components/Text.zig +++ b/src/tui/components/Text.zig @@ -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;