Skip to content

Commit ea7e9b4

Browse files
Xykonamotl
authored andcommitted
Update pyexec.c (pycom#417)
Allow CTRL-D when using the Base VARIANT Co-authored-by: @robert-hh
1 parent 63d4e56 commit ea7e9b4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/utils/pyexec.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,13 +491,18 @@ int pyexec_friendly_repl(void) {
491491
} else if (ret == CHAR_CTRL_D) {
492492
// exit for a soft reset
493493
mp_hal_stdout_tx_str("\r\n");
494+
#if (VARIANT == PYBYTES)
494495
if (config_get_pybytes_autostart()) {
495496
continue;
496497
}
497498
else {
498499
vstr_clear(&line);
499500
return PYEXEC_FORCED_EXIT;
500501
}
502+
#else
503+
vstr_clear(&line);
504+
return PYEXEC_FORCED_EXIT;
505+
#endif
501506
} else if (ret == CHAR_CTRL_E) {
502507
// paste mode
503508
mp_hal_stdout_tx_str("\r\npaste mode; Ctrl-C to cancel, Ctrl-D to finish\r\n=== ");

0 commit comments

Comments
 (0)