eric pouech (@epo) commented about programs/cmd/lineedit.c:
+ inputControl.dwCtrlWakeupMask = (1 << 0x09) | (1 << 0x1B); + /* FIXME: In the Windows SDK this is called dwControlKeyState */ + inputControl.dwConsoleKeyState = 0; + + ret = ReadConsoleW(hInput, inputBuffer, inputBufferLength, numRead, &inputControl); + + if (ret) { + inputBuffer[*numRead] = L'\0'; + TRACE("ReadConsole: [%lu][%s]\n", *numRead, wine_dbgstr_w(inputBuffer)); + len = lstrlenW(inputBuffer); + if (len > maxLen) { + maxLen = len; + } + oldCurPos = curPos; + curPos = 0; + while (curPos < inputBufferLength && shouldn't you loop with \*numRead as end marker instead of inputBufferLength?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101478