mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 21:01:24 +03:00
prompt: begin at bottom of history list when at secondary prompt
Whenever invoking a search prompt, calling up historical search items should start with the newest item. This fixes https://savannah.gnu.org/bugs/?61316. Bug existed since version 2.8.2, since help texts became searchable.
This commit is contained in:
parent
1ca2911b84
commit
3d6dcb9568
@ -456,6 +456,9 @@ functionptrtype acquire_an_answer(int *actual, bool *listed,
|
||||
size_t fragment_length = 0;
|
||||
/* The length of the fragment that the user tries to tab complete. */
|
||||
#endif
|
||||
|
||||
if (history_list != NULL)
|
||||
history_reset(*history_list);
|
||||
#endif /* ENABLE_HISTORIES */
|
||||
|
||||
if (typing_x > strlen(answer))
|
||||
@ -563,7 +566,7 @@ functionptrtype acquire_an_answer(int *actual, bool *listed,
|
||||
}
|
||||
|
||||
#ifdef ENABLE_HISTORIES
|
||||
/* Set the current position in the history list to the bottom. */
|
||||
/* Put the history pointer back at the bottom of the list. */
|
||||
if (history_list != NULL) {
|
||||
history_reset(*history_list);
|
||||
free(magichistory);
|
||||
|
Loading…
Reference in New Issue
Block a user