summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorailin-nemui <ailin-nemui@users.noreply.github.com>2017-04-06 17:37:23 +0200
committerGitHub <noreply@github.com>2017-04-06 17:37:23 +0200
commit3f69e718044ac87eeb5144be6113c2be33261cd0 (patch)
treef4343d09e338c45eacdcb49fc629829799b09025 /src
parent590056d3c33a0efc126f35c7c0a7389282158855 (diff)
parent41776d71f76924664bce1562ebe37743ba0cc9b7 (diff)
downloadirssi-3f69e718044ac87eeb5144be6113c2be33261cd0.zip
Merge pull request #685 from josephbisch/fix-462
Fix strange history behavior when history is empty
Diffstat (limited to 'src')
-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);
}