From 77981686c9cc81faa1be2ea08a9c0a14d8700aa9 Mon Sep 17 00:00:00 2001 From: vda Date: Sun, 15 Apr 2007 13:21:01 +0000 Subject: lineedit: state->hist_file doesn't exist if !FEATURE_EDITING_SAVEHISTORY, #ifdef it out git-svn-id: svn://busybox.net/trunk/busybox@18453 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- libbb/lineedit.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libbb') diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 4fc5e7a61..3cb9c3e28 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -948,8 +948,10 @@ static void remember_in_history(const char *str) state->history[i++] = xstrdup(str); state->cur_history = i; state->cnt_history = i; +#if ENABLE_FEATURE_EDITING_SAVEHISTORY if ((state->flags & SAVE_HISTORY) && state->hist_file) save_history(state->hist_file); +#endif USE_FEATURE_EDITING_FANCY_PROMPT(num_ok_lines++;) } -- cgit v1.2.3-55-g6feb