mirror of
https://github.com/reactos/reactos.git
synced 2026-05-31 16:31:07 +08:00
[CMD] Improve how the command prompt displays when one presses Ctrl-C/break after having pressed ENTER, or after a command has been run.
This commit is contained in:
@@ -453,8 +453,14 @@ BOOL ReadCommand(LPTSTR str, INT maxlen)
|
||||
if ((ir.Event.KeyEvent.dwControlKeyState &
|
||||
(RIGHT_CTRL_PRESSED|LEFT_CTRL_PRESSED)))
|
||||
{
|
||||
/* A CTRL-C. Don't clear the the command line,
|
||||
* but return an empty string in str. */
|
||||
/* Ignore the Ctrl-C key event if it has already been handled */
|
||||
if (!bCtrlBreak)
|
||||
break;
|
||||
|
||||
/*
|
||||
* A Ctrl-C. Do not clear the command line,
|
||||
* but return an empty string in str.
|
||||
*/
|
||||
str[0] = _T('\0');
|
||||
curx = orgx;
|
||||
cury = orgy;
|
||||
|
||||
Reference in New Issue
Block a user