Doh. Set a message when pane is too small rather than dying...

This commit is contained in:
Nicholas Marriott 2009-03-01 22:05:35 +00:00
parent a2a5abef13
commit 792b4db4a7

View File

@ -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;