changeset 68724:fb5a31085a6f

* window.c (adjust_window_trailing_edge): Check that shrinking does not set a window to size zero or less.
author Jan Djärv <jan.h.d@swipnet.se>
date Wed, 08 Feb 2006 13:39:52 +0000
parents d7669e5fe59f
children e59bf34a8b21
files src/ChangeLog src/window.c
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Feb 08 08:05:13 2006 +0000
+++ b/src/ChangeLog	Wed Feb 08 13:39:52 2006 +0000
@@ -1,3 +1,8 @@
+2006-02-08  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
+
+	* window.c (adjust_window_trailing_edge): Check that shrinking
+	does not set a window to size zero or less.
+
 2006-02-08  Miles Bader  <miles@gnu.org>
 
 	* editfns.c (Fconstrain_to_field): Use Fget_char_property instead
--- a/src/window.c	Wed Feb 08 08:05:13 2006 +0000
+++ b/src/window.c	Wed Feb 08 13:39:52 2006 +0000
@@ -4284,6 +4284,14 @@
 	{
 	  if (!NILP (XWINDOW (window)->next))
 	    {
+              /* This may happen for the minibuffer.  In that case
+                 the window_deletion_count check below does not work.  */
+              if (XINT (CURSIZE (p->next)) - delta <= 0) 
+                {
+                  Fset_window_configuration (old_config);
+                  error ("Cannot adjust window size as specified");
+                }
+
 	      XSETINT (CURBEG (p->next),
 		       XINT (CURBEG (p->next)) + delta);
 	      size_window (p->next, XINT (CURSIZE (p->next)) - delta,