aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Djärv <[email protected]>2006-02-08 13:39:52 +0000
committerJan Djärv <[email protected]>2006-02-08 13:39:52 +0000
commite99c752190064f6d73540fb61556dabdbc0b83f9 (patch)
tree3a1023e1ec3978a7637cb8869fd8e8fccd9a7b7e
parentab09adac9b3c3d45c89ac05cbfd39313782ce165 (diff)
* window.c (adjust_window_trailing_edge): Check that shrinking
does not set a window to size zero or less.
-rw-r--r--src/ChangeLog5
-rw-r--r--src/window.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 477d7e421f..40d498b5d4 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2006-02-08 Jan Dj,Ad(Brv <[email protected]>
+
+ * window.c (adjust_window_trailing_edge): Check that shrinking
+ does not set a window to size zero or less.
+
2006-02-08 Miles Bader <[email protected]>
* editfns.c (Fconstrain_to_field): Use Fget_char_property instead
diff --git a/src/window.c b/src/window.c
index 1df0320f01..5ffb8c9559 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,