On Fri Apr 18 16:37:52 2025 +0000, Joe Souza wrote:
OK, using ReadConsole/CONSOLE_READCONSOLE_CONTROL on Windows gives me the behaviour that I need; i.e. pre-filled text is preserved and can be further edited. Caller must output the text first, but seems to work as expected. I'll start making the changes to my code soon, within the coming days.
A bug in Wine's ReadConsole implementation that I found while making these changes is that Wine does not handle ESC key correctly. On Windows, ESC key clears the text on the screen and clears the buffer. Wine emits the control character for the ESC key. I'll handle this in my changes and add a FIXME comment.