Merge pull request #685 from josephbisch/fix-462

Fix strange history behavior when history is empty
(cherry picked from commit 3f69e71804)
This commit is contained in:
ailin-nemui 2017-04-06 17:37:23 +02:00 committed by Ailin Nemui
commit 35e56cdb75

View file

@ -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);
}