summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-split-window.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2013-03-25 15:59:57 +0000
committernicm <nicm@openbsd.org>2013-03-25 15:59:57 +0000
commit66fd485847c7edc5040f4db07b77bcc52bfbaab7 (patch)
tree60f67f4538fc7c1e7cd18e1925338bce78b5f8a4 /usr.bin/tmux/cmd-split-window.c
parentreseed the random pool with 'dmesg' when more devices are attached (diff)
downloadwireguard-openbsd-66fd485847c7edc5040f4db07b77bcc52bfbaab7.tar.xz
wireguard-openbsd-66fd485847c7edc5040f4db07b77bcc52bfbaab7.zip
Revert the command-prefix change which breaks sequences of commands.
Diffstat (limited to 'usr.bin/tmux/cmd-split-window.c')
-rw-r--r--usr.bin/tmux/cmd-split-window.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/usr.bin/tmux/cmd-split-window.c b/usr.bin/tmux/cmd-split-window.c
index 14f911cbebe..8a072121dbb 100644
--- a/usr.bin/tmux/cmd-split-window.c
+++ b/usr.bin/tmux/cmd-split-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-split-window.c,v 1.41 2013/03/24 09:57:59 nicm Exp $ */
+/* $OpenBSD: cmd-split-window.c,v 1.42 2013/03/25 15:59:57 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -59,8 +59,8 @@ cmd_split_window_exec(struct cmd *self, struct cmd_q *cmdq)
struct window *w;
struct window_pane *wp, *new_wp = NULL;
struct environ env;
- const char *cmd, *cwd, *shell, *prefix;
- char *cause, *new_cause, *cmd1;
+ const char *cmd, *cwd, *shell;
+ char *cause, *new_cause;
u_int hlimit;
int size, percentage;
enum layout_type type;
@@ -123,18 +123,9 @@ cmd_split_window_exec(struct cmd *self, struct cmd_q *cmdq)
goto error;
}
new_wp = window_add_pane(w, hlimit);
-
- if (*cmd != '\0') {
- prefix = options_get_string(&w->options, "command-prefix");
- xasprintf(&cmd1, "%s%s", prefix, cmd);
- } else
- cmd1 = xstrdup("");
- if (window_pane_spawn(new_wp, cmd1, shell, cwd, &env, s->tio,
- &cause) != 0) {
- free(cmd1);
+ if (window_pane_spawn(
+ new_wp, cmd, shell, cwd, &env, s->tio, &cause) != 0)
goto error;
- }
- free(cmd1);
layout_assign_pane(lc, new_wp);
server_redraw_window(w);