mirror of
https://github.com/tmux/tmux.git
synced 2025-04-10 11:08:49 +00:00
Doh. Set a message when pane is too small rather than dying...
This commit is contained in:
parent
a2a5abef13
commit
792b4db4a7
6
window.c
6
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>
|
* 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;
|
wanty = w->sy;
|
||||||
else {
|
else {
|
||||||
sizey = w->active->sy - 1; /* for separator */
|
sizey = w->active->sy - 1; /* for separator */
|
||||||
if (sizey < PANE_MINIMUM * 2)
|
if (sizey < PANE_MINIMUM * 2) {
|
||||||
|
*cause = xstrdup("pane too small");
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
}
|
||||||
|
|
||||||
if (wanty == -1)
|
if (wanty == -1)
|
||||||
wanty = sizey / 2;
|
wanty = sizey / 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user