Index: src/search.c =================================================================== --- src/search.c (revision 5249) +++ src/search.c (working copy) @@ -485,6 +485,11 @@ focusing = TRUE; +#ifndef DISABLE_HISTORIES + if (last_search[0] == '\0' && searchbot->prev != NULL) + last_search = mallocstrcpy(last_search, searchbot->prev->data); +#endif + if (last_search[0] != '\0') { #ifdef HAVE_REGEX_H /* Since answer is "", use last_search! */