From b26ea5d4e7a7e5f98f153ed85b0f650d4aa6aeda Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 31 Jul 2000 22:19:32 +0000 Subject: [PATCH] Don't allow jumping to last line in history from first line git-svn-id: http://svn.irssi.org/repos/irssi/trunk@567 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/command-history.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)) {