aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2000-09-05 10:51:59 +0000
committerGerd Moellmann2000-09-05 10:51:59 +0000
commitc930dfab96a00888f2b69addc0f808158a86efd0 (patch)
tree0fe6bc951fd1de0fc14c0c3a5c40090eea2d217e /src
parent311e7a8990e1bebd53ebe186307cabc185f0290f (diff)
downloademacs-c930dfab96a00888f2b69addc0f808158a86efd0.tar.gz
emacs-c930dfab96a00888f2b69addc0f808158a86efd0.zip
(window_loop) <GET_LARGEST_WINDOW>: Fix bug making
get-largest-window always return nil.
Diffstat (limited to 'src')
-rw-r--r--src/window.c18
1 files 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)
1710 1710
1711 case GET_LARGEST_WINDOW: 1711 case GET_LARGEST_WINDOW:
1712 { 1712 {
1713 struct window *b;
1714
1715 /* Ignore dedicated windows and minibuffers. */ 1713 /* Ignore dedicated windows and minibuffers. */
1716 if (MINI_WINDOW_P (w) 1714 if (MINI_WINDOW_P (w) || !NILP (w->dedicated))
1717 || !NILP (w->dedicated)
1718 || NILP (best_window))
1719 break; 1715 break;
1720 1716
1721 b = XWINDOW (best_window); 1717 if (NILP (best_window))
1722 if (NILP (best_window)
1723 || (XFASTINT (w->height) * XFASTINT (w->width)
1724 > (XFASTINT (b->height) * XFASTINT (b->width))))
1725 best_window = window; 1718 best_window = window;
1719 else
1720 {
1721 struct window *b = XWINDOW (best_window);
1722 if (XFASTINT (w->height) * XFASTINT (w->width)
1723 > XFASTINT (b->height) * XFASTINT (b->width))
1724 best_window = window;
1725 }
1726 } 1726 }
1727 break; 1727 break;
1728 1728