summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fe-common/core/command-history.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fe-common/core/command-history.c b/src/fe-common/core/command-history.c
index 1060744e..405700e5 100644
--- a/src/fe-common/core/command-history.c
+++ b/src/fe-common/core/command-history.c
@@ -116,6 +116,8 @@ const char *command_history_prev(WINDOW_REC *window, const char *text)
history->pos = history->pos->prev;
if (history->pos == NULL)
history->over_counter++;
+ } else if (history->lines == 0) {
+ history->over_counter++;
} else {
history->pos = g_list_last(history->list);
}