https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7cdbdadf345dfec6c9f921...
commit 7cdbdadf345dfec6c9f921580a300f8ff7ac3552 Author: Stanislav Motylkov x86corez@gmail.com AuthorDate: Thu Sep 13 12:47:01 2018 +0300 Commit: Hermès BÉLUSCA - MAÏTO hermes.belusca-maito@reactos.org CommitDate: Thu Sep 13 11:47:01 2018 +0200
[CMD] Do not overwrite input string on Ctrl+C (#852)
CORE-15029 --- base/shell/cmd/cmdinput.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/base/shell/cmd/cmdinput.c b/base/shell/cmd/cmdinput.c index 061b910179..e609c5ac35 100644 --- a/base/shell/cmd/cmdinput.c +++ b/base/shell/cmd/cmdinput.c @@ -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.