aboutsummaryrefslogtreecommitdiff
path: root/libbb/lineedit.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/lineedit.c')
-rw-r--r--libbb/lineedit.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 0b4e326d8..0ec9baa5f 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -2462,13 +2462,14 @@ int FAST_FUNC read_line_input(line_input_t *st, const char *prompt, char *comman
2462 timeout = st->timeout; 2462 timeout = st->timeout;
2463 } 2463 }
2464#if MAX_HISTORY > 0 2464#if MAX_HISTORY > 0
2465 if (state->flags & DO_HISTORY) {
2465# if ENABLE_FEATURE_EDITING_SAVEHISTORY 2466# if ENABLE_FEATURE_EDITING_SAVEHISTORY
2466 if (state->hist_file) 2467 if (state->hist_file)
2467 if (state->cnt_history == 0) 2468 if (state->cnt_history == 0)
2468 load_history(state); 2469 load_history(state);
2469# endif 2470# endif
2470 if (state->flags & DO_HISTORY)
2471 state->cur_history = state->cnt_history; 2471 state->cur_history = state->cnt_history;
2472 }
2472#endif 2473#endif
2473 2474
2474 /* prepare before init handlers */ 2475 /* prepare before init handlers */