mirror of
https://github.com/irssi/irssi.git
synced 2024-08-25 04:04:18 -04:00
Fix strange history behavior when history is empty
If text is being entered and then the user presses the up arrow followed by the down arrow, the expected behavior is to return to the text being entered. Prior to this commit that was not the case. Fixes #462
This commit is contained in:
parent
590056d3c3
commit
41776d71f7
@ -116,6 +116,8 @@ const char *command_history_prev(WINDOW_REC *window, const char *text)
|
|||||||
history->pos = history->pos->prev;
|
history->pos = history->pos->prev;
|
||||||
if (history->pos == NULL)
|
if (history->pos == NULL)
|
||||||
history->over_counter++;
|
history->over_counter++;
|
||||||
|
} else if (history->lines == 0) {
|
||||||
|
history->over_counter++;
|
||||||
} else {
|
} else {
|
||||||
history->pos = g_list_last(history->list);
|
history->pos = g_list_last(history->list);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user