From c930dfab96a00888f2b69addc0f808158a86efd0 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Tue, 5 Sep 2000 10:51:59 +0000 Subject: [PATCH] (window_loop) : Fix bug making get-largest-window always return nil. --- src/window.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/window.c b/src/window.c index c7aa6769aa7..d9c807ccf93 100644 --- a/src/window.c +++ b/src/window.c @@ -1710,19 +1710,19 @@ window_loop (type, obj, mini, frames) case GET_LARGEST_WINDOW: { - struct window *b; - /* Ignore dedicated windows and minibuffers. */ - if (MINI_WINDOW_P (w) - || !NILP (w->dedicated) - || NILP (best_window)) + if (MINI_WINDOW_P (w) || !NILP (w->dedicated)) break; - b = XWINDOW (best_window); - if (NILP (best_window) - || (XFASTINT (w->height) * XFASTINT (w->width) - > (XFASTINT (b->height) * XFASTINT (b->width)))) + if (NILP (best_window)) best_window = window; + else + { + struct window *b = XWINDOW (best_window); + if (XFASTINT (w->height) * XFASTINT (w->width) + > XFASTINT (b->height) * XFASTINT (b->width)) + best_window = window; + } } break; -- 2.39.2