Skip to content

Commit

Permalink
Merge pull request irssi#685 from josephbisch/fix-462
Browse files Browse the repository at this point in the history
Fix strange history behavior when history is empty
(cherry picked from commit 3f69e71)
  • Loading branch information
ailin-nemui authored and Ailin Nemui committed Jun 5, 2017
1 parent 7fc08ba commit 35e56cd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/fe-common/core/command-history.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 35e56cd

Please sign in to comment.