browser: make M-W/M-Q functional right after startup, if there is history
Do the same what the normal "research" code does: if nothing was searched for yet during this session, and there is a history of search items, then search for the last item in that history.master
parent
e32ca98ccf
commit
1db7d57a24
|
@ -725,6 +725,12 @@ void do_filesearch(bool forwards)
|
|||
* either forwards or backwards. */
|
||||
void do_fileresearch(bool forwards)
|
||||
{
|
||||
#ifdef ENABLE_HISTORIES
|
||||
/* If nothing was searched for yet, take the last item from history. */
|
||||
if (*last_search == '\0' && searchbot->prev != NULL)
|
||||
last_search = mallocstrcpy(last_search, searchbot->prev->data);
|
||||
#endif
|
||||
|
||||
if (*last_search == '\0')
|
||||
statusbar(_("No current search pattern"));
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue