eric pouech (@epo) commented about programs/cmd/lineedit.c:
/* Update cursor position to end of buffer. */
curPos = lstrlenW(inputBuffer);
}
break;
case L'\x1B': /* ESC */
/* FIXME: We shouldn't need to handle the ESC key in this code. ReadConsole on Windows will clear the text
* from the screen and the buffer, but Wine does not, instead emitting '^]' at the console.
*/
TRACE("ESC: [%s], len: %u, maxLen: %u\n", wine_dbgstr_w(inputBuffer), len, maxLen);
/* Clear buffer and text from screen. */
if (len) {
/* In cases where text spans multiple console lines, FillConsoleOutputCharacter does not seem
* to be working properly so we just manually write out a string full of spaces here.
*/
memset(inputBuffer, L' ', maxLen / sizeof(inputBuffer[0]));
this doesn't make any sense... rest of code uses maxlen as number of (w)chars not bytes
note also that native has several modes concerning line wrapping and wine doesn't implement the one you have in mind (ie a single line in "screen buffer" but that is displayed on several lines in output... line wrap changes when you change the width of the console).
wine implements the "old" fashion, ie if line is too long, it's spread across several screen buffer lines, but won't change when console width changes