mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 03:08:46 +00:00
Clear shared state if not filling it in.
This commit is contained in:
parent
efaf4c16cf
commit
c68ceca8cd
@ -158,6 +158,8 @@ cmdq_get_command(struct cmd_list *cmdlist, struct cmd_find_state *current,
|
|||||||
shared = xcalloc(1, sizeof *shared);
|
shared = xcalloc(1, sizeof *shared);
|
||||||
if (current != NULL)
|
if (current != NULL)
|
||||||
cmd_find_copy_state(&shared->current, current);
|
cmd_find_copy_state(&shared->current, current);
|
||||||
|
else
|
||||||
|
cmd_find_clear_state(&shared->current, 0);
|
||||||
if (m != NULL)
|
if (m != NULL)
|
||||||
memcpy(&shared->mouse, m, sizeof shared->mouse);
|
memcpy(&shared->mouse, m, sizeof shared->mouse);
|
||||||
|
|
||||||
@ -205,6 +207,7 @@ cmdq_fire_command(struct cmdq_item *item)
|
|||||||
retval = CMD_RETURN_ERROR;
|
retval = CMD_RETURN_ERROR;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item->client == NULL)
|
if (item->client == NULL)
|
||||||
item->client = cmd_find_client(item, NULL, 1);
|
item->client = cmd_find_client(item, NULL, 1);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user