From: Jan Djärv Date: Wed, 8 Feb 2006 13:39:52 +0000 (+0000) Subject: * window.c (adjust_window_trailing_edge): Check that shrinking X-Git-Tag: emacs-pretest-22.0.90~4278 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e99c752190064f6d73540fb61556dabdbc0b83f9;p=emacs.git * window.c (adjust_window_trailing_edge): Check that shrinking does not set a window to size zero or less. --- diff --git a/src/ChangeLog b/src/ChangeLog index 477d7e421f3..40d498b5d47 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-02-08 Jan Dj,Ad(Brv + + * window.c (adjust_window_trailing_edge): Check that shrinking + does not set a window to size zero or less. + 2006-02-08 Miles Bader * editfns.c (Fconstrain_to_field): Use Fget_char_property instead diff --git a/src/window.c b/src/window.c index 1df0320f01c..5ffb8c95593 100644 --- a/src/window.c +++ b/src/window.c @@ -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,