changeset 31393:9cb95a7ee33e

(window_loop) <GET_LARGEST_WINDOW>: Fix bug making get-largest-window always return nil.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 05 Sep 2000 10:51:59 +0000
parents 1f97a090ba6d
children bd0f43957f3e
files src/window.c
diffstat 1 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.c	Tue Sep 05 10:44:21 2000 +0000
+++ b/src/window.c	Tue Sep 05 10:51:59 2000 +0000
@@ -1710,19 +1710,19 @@
 
 	  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;