From: Gerd Moellmann Date: Tue, 5 Sep 2000 10:51:59 +0000 (+0000) Subject: (window_loop) : Fix bug making X-Git-Tag: emacs-pretest-21.0.90~1790 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c930dfab96a00888f2b69addc0f808158a86efd0;p=emacs.git (window_loop) : Fix bug making get-largest-window always return nil. --- 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;