diff --git a/src/fe-common/core/command-history.c b/src/fe-common/core/command-history.c index 1bffe2c7..acf7bde9 100644 --- a/src/fe-common/core/command-history.c +++ b/src/fe-common/core/command-history.c @@ -93,9 +93,9 @@ const char *command_history_next(WINDOW_REC *window, const char *text) pos = *phistpos; if (*phistpos == NULL) - *phistpos = window_history ? window->cmdhist : cmdhist; - else - *phistpos = (*phistpos)->next; + return ""; + + *phistpos = (*phistpos)->next; if (*text != '\0' && (pos == NULL || strcmp(pos->data, text) != 0)) {