]> git.eshelyaron.com Git - emacs.git/commitdiff
(window_loop) <GET_LARGEST_WINDOW>: Fix bug making
authorGerd Moellmann <gerd@gnu.org>
Tue, 5 Sep 2000 10:51:59 +0000 (10:51 +0000)
committerGerd Moellmann <gerd@gnu.org>
Tue, 5 Sep 2000 10:51:59 +0000 (10:51 +0000)
get-largest-window always return nil.

src/window.c

index c7aa6769aa70d0f46909dc4cb719a00d23a1a44b..d9c807ccf93d0022f87430272303625e3fb60c4b 100644 (file)
@@ -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;