Skip to content

Commit eb7637b

Browse files
robert-hhdpgeorge
authored andcommitted
esp8266/main.c: Clear the command line history when (re)booting.
Not clearing the command line history sometimes results in strange output when going back after a reset.
1 parent 047ac20 commit eb7637b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

esp8266/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include "py/stackctrl.h"
3535
#include "py/mphal.h"
3636
#include "py/gc.h"
37+
#include "lib/mp-readline/readline.h"
3738
#include "lib/utils/pyexec.h"
3839
#include "gccollect.h"
3940
#include "user_interface.h"
@@ -57,6 +58,7 @@ STATIC void mp_reset(void) {
5758
MP_STATE_PORT(mp_kbd_exception) = mp_obj_new_exception(&mp_type_KeyboardInterrupt);
5859
MP_STATE_PORT(term_obj) = MP_OBJ_NULL;
5960
pin_init0();
61+
readline_init0();
6062
#if MICROPY_MODULE_FROZEN
6163
pyexec_frozen_module("_boot.py");
6264
pyexec_file("boot.py");

0 commit comments

Comments
 (0)