From 792b4db4a761f45897f91105b0e3522781b9ec4b Mon Sep 17 00:00:00 2001
From: Nicholas Marriott <nicholas.marriott@gmail.com>
Date: Sun, 1 Mar 2009 22:05:35 +0000
Subject: [PATCH] Doh. Set a message when pane is too small rather than
 dying...

---
 window.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/window.c b/window.c
index 07201504..e5bd63a8 100644
--- a/window.c
+++ b/window.c
@@ -1,4 +1,4 @@
-/* $Id: window.c,v 1.68 2009-02-13 00:43:04 nicm Exp $ */
+/* $Id: window.c,v 1.69 2009-03-01 22:05:35 nicm Exp $ */
 
 /*
  * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -390,8 +390,10 @@ window_add_pane(struct window *w, int wanty, const char *cmd,
 		wanty = w->sy;
 	else {
 		sizey = w->active->sy - 1; /* for separator */
-		if (sizey < PANE_MINIMUM * 2)
+		if (sizey < PANE_MINIMUM * 2) {
+			*cause = xstrdup("pane too small");
 			return (NULL);
+		}
 
   		if (wanty == -1)
 			wanty = sizey / 2;