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

Merge pull request #946 from ailin-nemui/resize-freeze

fix irssi being stuck when resized very small
This commit is contained in:
ailin-nemui 2018-09-29 22:02:29 +02:00 committed by GitHub
commit 630c6f7e14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;