aboutsummaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
authorThomas <thomas@xteddy.org>2013-03-25 16:30:37 +0000
committerThomas <thomas@xteddy.org>2013-03-25 16:30:37 +0000
commit00af2df1027301a31531321c12eae6ff32989a3a (patch)
treeff4fc1452186d0f878c4c77475e9590b1ff1020e /window.c
parentbe390c19913a84be7114ce4188006c8ac26b6345 (diff)
parent972da2d498d6e410fd97c55fb422af7caf464622 (diff)
downloadrtmux-00af2df1027301a31531321c12eae6ff32989a3a.tar.gz
rtmux-00af2df1027301a31531321c12eae6ff32989a3a.tar.bz2
rtmux-00af2df1027301a31531321c12eae6ff32989a3a.zip
Merge branch 'obsd-master'
Diffstat (limited to 'window.c')
-rw-r--r--window.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/window.c b/window.c
index 2be51e93..e30fb7e4 100644
--- a/window.c
+++ b/window.c
@@ -311,24 +311,15 @@ window_create(const char *name, const char *cmd, const char *shell,
{
struct window *w;
struct window_pane *wp;
- const char *prefix;
- char *cmd1;
w = window_create1(sx, sy);
wp = window_add_pane(w, hlimit);
layout_init(w, wp);
- if (*cmd != '\0') {
- prefix = options_get_string(&w->options, "command-prefix");
- xasprintf(&cmd1, "%s%s", prefix, cmd);
- } else
- cmd1 = xstrdup("");
- if (window_pane_spawn(wp, cmd1, shell, cwd, env, tio, cause) != 0) {
+ if (window_pane_spawn(wp, cmd, shell, cwd, env, tio, cause) != 0) {
window_destroy(w);
- free(cmd1);
return (NULL);
}
- free(cmd1);
w->active = TAILQ_FIRST(&w->panes);
if (name != NULL) {