Commit c930dfab authored by Gerd Moellmann's avatar Gerd Moellmann

(window_loop) <GET_LARGEST_WINDOW>: Fix bug making

get-largest-window always return nil.
parent 311e7a89
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment