1
0
Fork 0

Added support for pressing esc in shell so it escapes the current line and allows you to type a new command

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1136
This commit is contained in:
Peter Veenstra 2003-07-14 17:44:00 +00:00
parent 836fa34786
commit fc02a41aad

View file

@ -231,6 +231,16 @@ void DOS_Shell::InputCommand(char * line) {
}
}
break;
case 0x1b: /* ESC */
//write a backslash and return to the next line
outc('\\');
outc('\n');
*line = 0; // reset the line.
if (l_completion.size()) l_completion.clear(); //reset the completion list.
this->InputCommand(line); //Get the NEW line.
size = 0; // stop the next loop
str_len = 0; // prevent multiple adds of the same line
break;
default:
if (l_completion.size()) l_completion.clear();
line[str_index]=c;