We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 401af50 commit e9751d2Copy full SHA for e9751d2
1 file changed
unix/main.c
@@ -176,7 +176,11 @@ STATIC int do_repl(void) {
176
int ret = readline(&line, ">>> ");
177
mp_parse_input_kind_t parse_input_kind = MP_PARSE_SINGLE_INPUT;
178
179
- if (ret == CHAR_CTRL_D) {
+ if (ret == CHAR_CTRL_C) {
180
+ // cancel input
181
+ mp_hal_stdout_tx_str("\r\n");
182
+ goto input_restart;
183
+ } else if (ret == CHAR_CTRL_D) {
184
// EOF
185
printf("\n");
186
mp_hal_stdio_mode_orig();
0 commit comments