1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

fix irssi being stuck when resized very small

This commit is contained in:
ailin-nemui 2018-09-26 14:16:09 +02:00
parent cdfd75da98
commit db005007cf

View File

@ -285,8 +285,13 @@ static MAIN_WINDOW_REC *mainwindows_find_lower(MAIN_WINDOW_REC *window)
MAIN_WINDOW_REC *best;
GSList *tmp;
/* unfortunate special case: if the window has been resized
and there is not enough room, the last_line could become
smaller than the first_line, sending us in an infinite
loop */
if (window != NULL)
last_line = window->last_line;
last_line =
window->last_line > window->first_line ? window->last_line : window->first_line;
else
last_line = -1;