Re: [PATCH v4 0/1] MR8467: conhost: Implement F1 and F3 support for history retrieval.
5 Jul
2025
5 Jul
'25
7:40 a.m.
eric pouech (@epo) commented about programs/conhost/conhost.c:
while (ctx->history_index != start_pos); }
+static void edit_line_copy_from_hist( struct console *console, int copycount ) +{ + if (console->edit_line.history_index) + { + unsigned int index = console->edit_line.history_index - 1; + struct edit_line *ctx = &console->edit_line; + WCHAR *line = edit_line_history(console, index);
since you're not changing the `console->history` content, you could access `console->history[index]` directly (that would save recomputing the length, and one allocation) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8467#note_108890
165
Age (days ago)
165
Last active (days ago)
0 comments
1 participants
participants (1)
-
eric pouech (@epo)