aboutsummaryrefslogtreecommitdiff
path: root/mode-tree.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2020-04-13 18:01:43 +0100
committerThomas Adam <thomas@xteddy.org>2020-04-13 18:01:43 +0100
commitacc00cd13a767067f85ed27d52ad543c9a58869c (patch)
tree924a72d2029f32a3fb2b544bbc295b7e19bd197e /mode-tree.c
parent0a11f1607b9f3623dce287d4940bb925b533a340 (diff)
parent34804f2709a16dca45dc072fb53d03f79db61e51 (diff)
downloadrtmux-acc00cd13a767067f85ed27d52ad543c9a58869c.tar.gz
rtmux-acc00cd13a767067f85ed27d52ad543c9a58869c.tar.bz2
rtmux-acc00cd13a767067f85ed27d52ad543c9a58869c.zip
Merge branch 'obsd-master'
Diffstat (limited to 'mode-tree.c')
-rw-r--r--mode-tree.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mode-tree.c b/mode-tree.c
index 843a74bc..d9af2ee3 100644
--- a/mode-tree.c
+++ b/mode-tree.c
@@ -1064,6 +1064,7 @@ mode_tree_run_command(struct client *c, struct cmd_find_state *fs,
const char *template, const char *name)
{
struct cmdq_item *new_item;
+ struct cmdq_state *new_state;
char *command;
struct cmd_parse_result *pr;
@@ -1085,7 +1086,9 @@ mode_tree_run_command(struct client *c, struct cmd_find_state *fs,
free(pr->error);
break;
case CMD_PARSE_SUCCESS:
- new_item = cmdq_get_command(pr->cmdlist, fs, NULL, 0);
+ new_state = cmdq_new_state(fs, NULL, 0);
+ new_item = cmdq_get_command(pr->cmdlist, new_state);
+ cmdq_free_state(new_state);
cmdq_append(c, new_item);
cmd_list_free(pr->cmdlist);
break;