msh: fix Ctrl-C handling with line editing
This commit is contained in:
1 parent
a2980c6249
commit
80667e30fb
3 files changed
+7
-6
No files matched your search
+3
-1
@@ -4836,7 +4836,9 @@ static int filechar(struct ioarg *ap)
|
||||
static int position = 0, size = 0;
|
||||
|
||||
while (size == 0 || position >= size) {
|
||||
read_line_input(current_prompt, filechar_cmdbuf, BUFSIZ, line_input_state);
|
||||
/* Repeat if Ctrl-C is pressed. TODO: exit on -1 (error/EOF)? */
|
||||
while (read_line_input(current_prompt, filechar_cmdbuf, BUFSIZ, line_input_state) == 0)
|
||||
continue;
|
||||
size = strlen(filechar_cmdbuf);
|
||||
position = 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user