eric pouech (@epo) commented about programs/cmd/wcmdmain.c:
- }
+}
+/* Intended as a mostly drop-in replacement for ReadConsole, but with tab-completion support.
- */
+BOOL WCMD_read_console(const HANDLE hInput, WCHAR *inputBuffer, const DWORD inputBufferLength, LPDWORD numRead) +{
- HANDLE hOutput = GetStdHandle(STD_OUTPUT_HANDLE);
- SEARCH_CONTEXT sc = {0};
- WCHAR *lastResult = NULL;
- CONSOLE_SCREEN_BUFFER_INFO startConsoleInfo, lastConsoleInfo, currentConsoleInfo;
- DWORD numWritten;
- UINT oldCurPos, curPos;
- BOOL done = FALSE;
- BOOL ret = FALSE;
- static int maxLen = 0; /* Track maximum length in case user fetches a long string from a previous iteration in history. */
I don't see why this variable needs to be static...