summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenis Vlasenko2008-11-02 00:41:05 +0000
committerDenis Vlasenko2008-11-02 00:41:05 +0000
commit3c385cd706da9b309527d67e3c91c0d01915722e (patch)
tree2fbe9faf5cd67d13dfaf9f0dcf76bf77a0b0713e /libbb
parent9b0f6e1142ae134900f879584b95f050416757df (diff)
downloadbusybox-3c385cd706da9b309527d67e3c91c0d01915722e.zip
busybox-3c385cd706da9b309527d67e3c91c0d01915722e.tar.gz
lineedit: fix bug 5824: Since version 23530 with lineedit.c,
"fdisk" & "ed" can't work any more
Diffstat (limited to 'libbb')
-rw-r--r--libbb/lineedit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index c2c3ea9..1f21866 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 */