]> git.eshelyaron.com Git - emacs.git/commitdiff
* window.c (adjust_window_trailing_edge): Check that shrinking
authorJan Djärv <jan.h.d@swipnet.se>
Wed, 8 Feb 2006 13:39:52 +0000 (13:39 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Wed, 8 Feb 2006 13:39:52 +0000 (13:39 +0000)
 does not set a window to size zero or less.

src/ChangeLog
src/window.c

index 477d7e421f3f58b49789848fe3c1d082add1b4b0..40d498b5d477757d4ce43507e0b4dec13a315442 100644 (file)
@@ -1,3 +1,8 @@
+2006-02-08  Jan Dj\e,Ad\e(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
index 1df0320f01c261b642310a31dcdb02345be0aeb0..5ffb8c95593e3b516a6597b6898ad8c489285a95 100644 (file)
@@ -4284,6 +4284,14 @@ adjust_window_trailing_edge (window, delta, horiz_flag)
        {
          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,