diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-03-07 09:29:54 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-03-07 09:29:54 +0000 |
commit | 56f80a5b09ce98e3bdbef5c3e24fd092e55ed33f (patch) | |
tree | 738f7054a872d1330329f29189b137107d2aa864 /window.c | |
parent | 8a6a7e74da70400cc98e7596c7d9d19848ca3aa1 (diff) | |
download | rtmux-56f80a5b09ce98e3bdbef5c3e24fd092e55ed33f.tar.gz rtmux-56f80a5b09ce98e3bdbef5c3e24fd092e55ed33f.tar.bz2 rtmux-56f80a5b09ce98e3bdbef5c3e24fd092e55ed33f.zip |
break-pane command to split a pane off into a new window; bound to ! by default.
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: window.c,v 1.69 2009-03-01 22:05:35 nicm Exp $ */ +/* $Id: window.c,v 1.70 2009-03-07 09:29:54 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -201,8 +201,7 @@ window_index(struct window *s, u_int *i) } struct window * -window_create(const char *name, const char *cmd, const char *cwd, - const char **envp, u_int sx, u_int sy, u_int hlimit, char **cause) +window_create1(u_int sx, u_int sy) { struct window *w; u_int i; @@ -229,6 +228,16 @@ window_create(const char *name, const char *cmd, const char *cwd, ARRAY_ADD(&windows, w); w->references = 0; + return (w); +} + +struct window * +window_create(const char *name, const char *cmd, const char *cwd, + const char **envp, u_int sx, u_int sy, u_int hlimit, char **cause) +{ + struct window *w; + + w = window_create1(sx, sy); if (window_add_pane(w, -1, cmd, cwd, envp, hlimit, cause) == NULL) { window_destroy(w); return (NULL); |