eric pouech (@epo) commented about programs/cmd/lineedit.c:
FindInsertPos(inputBuffer, curPos, &sc);}/* Copy search results to input buffer. */UpdateInputBuffer(inputBuffer, inputBufferLength, &sc);/* Update cursor position to end of buffer. */curPos = lstrlenW(inputBuffer);if (curPos > maxLen) {maxLen = curPos;}}break;case L'\x1B': /* ESC */
looks at that question, and you're right... ReadConsole needs to handle ESC. I'll send a patch later on, so can drop ESC handling from your patch