···207207 self.images.cache.deinit();
208208}
209209210210-pub fn inputToSlice(self: *App) []const u8 {
210210+/// Reads the current text input without consuming it.
211211+/// The returned slice is valid until the next call to readInput() or until
212212+/// the text_input buffer is modified.
213213+pub fn readInput(self: *App) []const u8 {
211214 const first = self.text_input.buf.firstHalf();
212215 const second = self.text_input.buf.secondHalf();
213216 var dest_idx: usize = 0;
+1-1
src/drawer.zig
···6262 try self.drawFilePreview(app, win, file_name_bar);
6363 }
64646565- const input = app.inputToSlice();
6565+ const input = app.readInput();
6666 drawUserInput(app.state, &app.text_input, input, win);
67676868 // Notification should be drawn last.