mirror of https://github.com/fairyglade/ly.git
Fix out of bounds issue when using the Delete key
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
parent
5a9cc881fe
commit
629749b383
|
@ -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…
Reference in New Issue