Don't reload or enter repl when autoreloading

A keypress while we waited for autoreload used to enter repl. Now
it won't.

Fixes #6480
This commit is contained in:
Scott Shawcroft 2022-08-11 12:23:25 -07:00 committed by Dan Halbert
parent 4a5790bb00
commit 0d88f8472f

2
main.c
View File

@ -508,7 +508,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool first_run, bool *simulate_re
} }
// If interrupted by keyboard, return // If interrupted by keyboard, return
if (serial_connected() && serial_bytes_available()) { if (serial_connected() && serial_bytes_available() && !autoreload_pending()) {
// Skip REPL if reload was requested. // Skip REPL if reload was requested.
skip_repl = serial_read() == CHAR_CTRL_D; skip_repl = serial_read() == CHAR_CTRL_D;
if (skip_repl) { if (skip_repl) {