[CMD] Do not overwrite input string on Ctrl+C (#852)

CORE-15029
This commit is contained in:
Stanislav Motylkov 2018-09-13 12:47:01 +03:00 committed by Hermès BÉLUSCA - MAÏTO
parent 2ccfe267a0
commit 7cdbdadf34

View file

@ -457,6 +457,13 @@ BOOL ReadCommand(LPTSTR str, INT maxlen)
if (!bCtrlBreak)
break;
/*
* Fully print the entered string
* so the command prompt would not overwrite it.
*/
SetCursorXY(orgx, orgy);
ConOutPrintf(_T("%s"), str);
/*
* A Ctrl-C. Do not clear the command line,
* but return an empty string in str.