We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a613b67 commit 2949d08Copy full SHA for 2949d08
unix/main.c
@@ -290,8 +290,6 @@ int main(int argc, char **argv) {
290
mp_hal_init();
291
mp_init();
292
293
- prompt_read_history();
294
-
295
#ifndef _WIN32
296
// create keyboard interrupt object
297
MP_STATE_VM(keyboard_interrupt_obj) = mp_obj_new_exception(&mp_type_KeyboardInterrupt);
@@ -446,7 +444,9 @@ int main(int argc, char **argv) {
446
444
}
447
445
448
if (ret == NOTHING_EXECUTED) {
+ prompt_read_history();
449
ret = do_repl();
+ prompt_write_history();
450
451
452
#if MICROPY_PY_MICROPYTHON_MEM_INFO
@@ -455,8 +455,6 @@ int main(int argc, char **argv) {
455
456
#endif
457
458
- prompt_write_history();
459
460
mp_deinit();
461
mp_hal_deinit();
462
0 commit comments