From: Denis Vlasenko Date: Sun, 2 Nov 2008 00:41:05 +0000 (-0000) Subject: lineedit: fix bug 5824: Since version 23530 with lineedit.c, X-Git-Tag: 1_13_0~30 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3c385cd706da9b309527d67e3c91c0d01915722e;p=oweals%2Fbusybox.git lineedit: fix bug 5824: Since version 23530 with lineedit.c, "fdisk" & "ed" can't work any more --- diff --git a/libbb/lineedit.c b/libbb/lineedit.c index c2c3ea996..1f21866ca 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -1415,7 +1415,8 @@ int FAST_FUNC read_line_input(const char *prompt, char *command, int maxsize, li if ((state->flags & SAVE_HISTORY) && state->hist_file) load_history(state->hist_file); #endif - state->cur_history = state->cnt_history; + if (state->flags & DO_HISTORY) + state->cur_history = state->cnt_history; /* prepare before init handlers */ cmdedit_y = 0; /* quasireal y, not true if line > xt*yt */