nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 1ca2911b846eb56888114600edcdd00a9510bf05
parent 8ef74b3aac3e9f19f4dcfd2bdd9b9dd6562a1f73
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Fri,  8 Oct 2021 12:36:32 +0200

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.

Diffstat:
Msrc/prompt.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/prompt.c b/src/prompt.c @@ -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