#ifndef NANO_SMALL
/* add this search string to the search history list */
- update_history(&search_history, answer);
+ if (strcmp(answer, ""))
+ update_history(&search_history, answer);
#endif /* !NANO_SMALL */
search_last_line = 0;
}
#ifndef NANO_SMALL
- update_history(&search_history, answer);
+ if (strcmp(answer, ""))
+ update_history(&search_history, answer);
#endif /* !NANO_SMALL */
/* Again, there was a previous string, but they deleted it and hit enter */
_("Replace with"));
}
#ifndef NANO_SMALL
- if (i == 0)
+ if (i == 0 && strcmp(answer, ""))
update_history(&replace_history, answer);
#endif /* !NANO_SMALL */