text_input: add comment about ArrayList not being ideal
Siged-off-by: Tim Culverhouse <tim@timculverhouse.com>
This commit is contained in:
parent
d2f02897dc
commit
fd97fff931
1 changed files with 3 additions and 0 deletions
|
@ -18,6 +18,9 @@ const Event = union(enum) {
|
|||
cursor_idx: usize = 0,
|
||||
grapheme_count: usize = 0,
|
||||
|
||||
// TODO: an ArrayList is not great for this. orderedRemove is O(n) and we can
|
||||
// only remove one byte at a time. Make a bespoke ArrayList which allows removal
|
||||
// of a slice at a time, or truncating even would be nice
|
||||
buf: std.ArrayList(u8),
|
||||
|
||||
pub fn init(alloc: std.mem.Allocator) TextInput {
|
||||
|
|
Loading…
Reference in a new issue