textEntry: fix crash when typing at the very end of limit

This commit is contained in:
David Vanderson 2023-05-23 13:02:19 -04:00
parent b3d53b351e
commit 4723a2d8b6
2 changed files with 1 additions and 4 deletions

View file

@ -7547,7 +7547,7 @@ pub const TextEntryWidget = struct {
}
// insert
std.mem.copy(u8, self.text[sel.cursor..], new);
std.mem.copy(u8, self.text[sel.cursor..], new[0..new_len]);
sel.cursor += new_len;
sel.end = sel.cursor;
sel.start = sel.cursor;

View file

@ -6,9 +6,6 @@ add horizontal scrolling
- ScrollArea: don't make boxes and bars if there's no scrolling in that direction
- also need option to have scrolling but not show bars? For single line text entry
make horizontal scrolling default to none
- ScrollInfo
test a scrollArea with horizontal scrolling but no vertical scrolling
- can you expand vertically?