-/* $OpenBSD: cmd-send-keys.c,v 1.73 2022/12/16 08:13:40 nicm Exp $ */
+/* $OpenBSD: cmd-send-keys.c,v 1.74 2022/12/19 07:30:10 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
.target = { 't', CMD_FIND_PANE, 0 },
- .flags = CMD_AFTERHOOK|CMD_CLIENT_CFLAG,
+ .flags = CMD_AFTERHOOK|CMD_CLIENT_CFLAG|CMD_CLIENT_CANFAIL,
.exec = cmd_send_keys_exec
};
struct key_event *event;
if (args_has(args, 'K')) {
+ if (tc == NULL)
+ return (item);
event = xmalloc(sizeof *event);
event->key = key;
memset(&event->m, 0, sizeof event->m);