mirror of
https://github.com/irssi/irssi.git
synced 2025-02-02 15:08:01 -05:00
Simplify and remove dead code, MAIN_WINDOW_TEXT_HEIGHT(rec) >= WINDOW_MIN_SIZE
always holds. git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4948 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
fe9b63ef65
commit
04a028d8c9
@ -389,7 +389,7 @@ static void mainwindows_resize_smaller(int xdiff, int ydiff)
|
|||||||
rec = tmp->data;
|
rec = tmp->data;
|
||||||
|
|
||||||
space = MAIN_WINDOW_TEXT_HEIGHT(rec)-WINDOW_MIN_SIZE;
|
space = MAIN_WINDOW_TEXT_HEIGHT(rec)-WINDOW_MIN_SIZE;
|
||||||
if (space <= 0) {
|
if (space == 0) {
|
||||||
mainwindow_resize(rec, xdiff, 0);
|
mainwindow_resize(rec, xdiff, 0);
|
||||||
|
|
||||||
rec->first_line += ydiff;
|
rec->first_line += ydiff;
|
||||||
@ -398,7 +398,6 @@ static void mainwindows_resize_smaller(int xdiff, int ydiff)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (space <= 0) space = 1;
|
|
||||||
if (space > -ydiff) space = -ydiff;
|
if (space > -ydiff) space = -ydiff;
|
||||||
rec->last_line += ydiff;
|
rec->last_line += ydiff;
|
||||||
ydiff += space;
|
ydiff += space;
|
||||||
@ -428,7 +427,7 @@ static void mainwindows_resize_bigger(int xdiff, int ydiff)
|
|||||||
MAIN_WINDOW_REC *rec = tmp->data;
|
MAIN_WINDOW_REC *rec = tmp->data;
|
||||||
|
|
||||||
space = MAIN_WINDOW_TEXT_HEIGHT(rec)-WINDOW_MIN_SIZE;
|
space = MAIN_WINDOW_TEXT_HEIGHT(rec)-WINDOW_MIN_SIZE;
|
||||||
if (ydiff == 0 || (space >= 0 && tmp->next != NULL)) {
|
if (ydiff == 0 || tmp->next != NULL) {
|
||||||
mainwindow_resize(rec, xdiff, 0);
|
mainwindow_resize(rec, xdiff, 0);
|
||||||
if (moved > 0) {
|
if (moved > 0) {
|
||||||
rec->first_line += moved;
|
rec->first_line += moved;
|
||||||
@ -438,14 +437,8 @@ static void mainwindows_resize_bigger(int xdiff, int ydiff)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (space < 0 && tmp->next != NULL) {
|
/* lowest window - give all the extra space for it */
|
||||||
/* space below minimum */
|
space = ydiff;
|
||||||
space = -space;
|
|
||||||
if (space > ydiff) space = ydiff;
|
|
||||||
} else {
|
|
||||||
/* lowest window - give all the extra space for it */
|
|
||||||
space = ydiff;
|
|
||||||
}
|
|
||||||
ydiff -= space;
|
ydiff -= space;
|
||||||
rec->first_line += moved;
|
rec->first_line += moved;
|
||||||
moved += space;
|
moved += space;
|
||||||
|
Loading…
Reference in New Issue
Block a user