Re: [PATCH v4 0/1] MR8467: conhost: Implement F1 and F3 support for history retrieval.
eric pouech (@epo) commented about programs/conhost/conhost.c:
+{ + 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); + unsigned int len = line ? lstrlenW(line) : 0; + + if (len > ctx->cursor) + { + unsigned int ccount = (copycount > 0) ? copycount : len - ctx->cursor; + + /* Clean the screen. */ + edit_line_delete(console, ctx->cursor, ctx->len); + /* Insert new string. */ + if (edit_line_grow(console, len + 1)) this will overallocate
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/8467#note_108892
participants (1)
-
eric pouech (@epo)