prompt: keep a clear answer clear also after an excursion into history

When the answer at the prompt was clear before the user went up into
the history list, the answer should be cleared again when the user
comes back down to the present.

This fixes https://savannah.gnu.org/bugs/?61308.

Bug existed since before version 2.2.0.
master
Benno Schulenberg 2021-10-08 12:36:32 +02:00
parent 8ef74b3aac
commit 1ca2911b84
1 changed files with 1 additions and 1 deletions

View File

@ -507,7 +507,7 @@ functionptrtype acquire_an_answer(int *actual, bool *listed,
if (history_list != NULL) {
/* If we're scrolling up at the bottom of the history list
* and answer isn't blank, save answer in magichistory. */
if ((*history_list)->next == NULL && *answer != '\0')
if ((*history_list)->next == NULL)
magichistory = mallocstrcpy(magichistory, answer);
/* Get the older search from the history list and save it in