summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorRobert HH <robert@hammelrath.com>2016-06-26 09:01:18 +0200
committerDamien George <damien.p.george@gmail.com>2016-06-26 12:48:19 +0100
commiteb7637ba2e1c174e18cb691a9ef9308e24dff3bb (patch)
tree796a34c93a45938fb3e084450cf43dd96e38aa1b
parent047ac2044dc48fa34aa2092b88867082987bfe94 (diff)
downloadmicropython-eb7637ba2e1c174e18cb691a9ef9308e24dff3bb.tar.gz
micropython-eb7637ba2e1c174e18cb691a9ef9308e24dff3bb.zip
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.
-rw-r--r--esp8266/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/esp8266/main.c b/esp8266/main.c
index 9cc955e44c..0224bed488 100644
--- a/esp8266/main.c
+++ b/esp8266/main.c
@@ -34,6 +34,7 @@
#include "py/stackctrl.h"
#include "py/mphal.h"
#include "py/gc.h"
+#include "lib/mp-readline/readline.h"
#include "lib/utils/pyexec.h"
#include "gccollect.h"
#include "user_interface.h"
@@ -57,6 +58,7 @@ STATIC void mp_reset(void) {
MP_STATE_PORT(mp_kbd_exception) = mp_obj_new_exception(&mp_type_KeyboardInterrupt);
MP_STATE_PORT(term_obj) = MP_OBJ_NULL;
pin_init0();
+ readline_init0();
#if MICROPY_MODULE_FROZEN
pyexec_frozen_module("_boot.py");
pyexec_file("boot.py");