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:
parent
836fa34786
commit
fc02a41aad
1 changed files with 10 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue