summaryrefslogtreecommitdiffstats
path: root/cmd-queue.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2023-09-15 10:01:11 +0100
committerThomas Adam <thomas@xteddy.org>2023-09-15 10:01:11 +0100
commit9f9156c0303ad9c50fd44e0561ef0f5bb21a418b (patch)
tree9f560c0ba4c8fb3eadc1bee672094a6e2d84fc82 /cmd-queue.c
parentc57a09269b2a40bc78cb03febb24acfdaddd7331 (diff)
parentd394293ba59fc932085eb8c01592822a9b1ec1f7 (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-queue.c')
-rw-r--r--cmd-queue.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd-queue.c b/cmd-queue.c
index e5188c54..e188afcd 100644
--- a/cmd-queue.c
+++ b/cmd-queue.c
@@ -236,8 +236,10 @@ cmdq_link_state(struct cmdq_state *state)
/* Make a copy of a state. */
struct cmdq_state *
-cmdq_copy_state(struct cmdq_state *state)
+cmdq_copy_state(struct cmdq_state *state, struct cmd_find_state *current)
{
+ if (current != NULL)
+ return (cmdq_new_state(current, &state->event, state->flags));
return (cmdq_new_state(&state->current, &state->event, state->flags));
}