changeset 42862:ca273f84f170

(MIN_SAFE_WINDOW_HEIGHT): Value now 1.
author Richard M. Stallman <rms@gnu.org>
date Sun, 20 Jan 2002 23:09:45 +0000
parents 3ee90bcdf67d
children cff9c12217fd
files src/window.c
diffstat 1 files changed, 21 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.c	Sun Jan 20 22:10:54 2002 +0000
+++ b/src/window.c	Sun Jan 20 23:09:45 2002 +0000
@@ -2118,7 +2118,7 @@
    might crash Emacs.  */
 
 #define MIN_SAFE_WINDOW_WIDTH  (2)
-#define MIN_SAFE_WINDOW_HEIGHT (2)
+#define MIN_SAFE_WINDOW_HEIGHT (1)
 
 /* Make sure that window_min_height and window_min_width are
    not too small; if they are, set them to safe minima.  */
@@ -3547,17 +3547,29 @@
 	{
 	  /* If trying to grow this window to or beyond size of the parent,
 	     just delete all the sibling windows.  */
-	  Lisp_Object tem, next;
-
-	  tem = XWINDOW (parent)->vchild;
-	  if (NILP (tem))
-	    tem = XWINDOW (parent)->hchild;
-
+	  Lisp_Object start, tem, next;
+
+	  start = XWINDOW (parent)->vchild;
+	  if (NILP (start))
+	    start = XWINDOW (parent)->hchild;
+
+	  /* Delete any siblings that come after WINDOW.  */
+	  tem = XWINDOW (window)->next;
 	  while (! NILP (tem))
 	    {
 	      next = XWINDOW (tem)->next;
-	      if (!EQ (tem, window))
-		delete_window (tem);
+	      delete_window (tem);
+	      tem = next;
+	    }
+
+	  /* Delete any siblings that come after WINDOW.
+	     Note that if START is not WINDOW, then WINDOW still
+	     Fhas siblings, so WINDOW has not yet replaced its parent.  */
+	  tem = start;
+	  while (! EQ (tem, window))
+	    {
+	      next = XWINDOW (tem)->next;
+	      delete_window (tem);
 	      tem = next;
 	    }
 	}