diff --git a/filecomplete.cpp b/filecomplete.cpp index 82ec7ee..0b2bf80 100644 --- a/filecomplete.cpp +++ b/filecomplete.cpp @@ -501,6 +501,14 @@ char* fc_readline() std::chrono::time_point p1, p2; p1 = std::chrono::high_resolution_clock::now(); +#if defined(OS_WINDOWS) + HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); + CONSOLE_CURSOR_INFO cursorInfo; + GetConsoleCursorInfo(hConsole, &cursorInfo); + cursorInfo.bVisible = TRUE; + SetConsoleCursorInfo(hConsole, &cursorInfo); +#endif + while (1) { word.clear(); clear_line(); @@ -540,6 +548,13 @@ char* fc_readline() switch (ch) { case ENTER: +#if defined(OS_WINDOWS) + hConsole = GetStdHandle(STD_OUTPUT_HANDLE); + CONSOLE_CURSOR_INFO cursorInfo; + GetConsoleCursorInfo(hConsole, &cursorInfo); + cursorInfo.bVisible = FALSE; + SetConsoleCursorInfo(hConsole, &cursorInfo); +#endif append_his(main_buf); return main_buf; #if defined(OS_WINDOWS)