aboutsummaryrefslogtreecommitdiff
path: root/libbb/lineedit.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/lineedit.c')
-rw-r--r--libbb/lineedit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 0d232889b..1390ed62d 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -1520,8 +1520,10 @@ static void remember_in_history(char *str)
1520 for (i = 0; i < state->max_history-1; i++) 1520 for (i = 0; i < state->max_history-1; i++)
1521 state->history[i] = state->history[i+1]; 1521 state->history[i] = state->history[i+1];
1522 /* i == state->max_history-1 */ 1522 /* i == state->max_history-1 */
1523 if (ENABLE_FEATURE_EDITING_SAVE_ON_EXIT && state->cnt_history_in_file) 1523# if ENABLE_FEATURE_EDITING_SAVE_ON_EXIT
1524 if (state->cnt_history_in_file)
1524 state->cnt_history_in_file--; 1525 state->cnt_history_in_file--;
1526# endif
1525 } 1527 }
1526 /* i <= state->max_history-1 */ 1528 /* i <= state->max_history-1 */
1527 state->history[i++] = xstrdup(str); 1529 state->history[i++] = xstrdup(str);