diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2022-12-19 07:30:11 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2022-12-19 07:30:11 +0000 |
commit | deeda8aa1d7cfef298a8ef70e60e8c819bc3f751 (patch) | |
tree | 6f00a0f68b0a88224680a9d47a225a343dad4c0c /usr.bin | |
parent | 9c6d8f418ca3e6033919d569669f7fb492214d21 (diff) |
Allow send-keys without a client again, reported by Stefan Hagen.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/cmd-send-keys.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-send-keys.c b/usr.bin/tmux/cmd-send-keys.c index e65597781e8..c8ee97f2295 100644 --- a/usr.bin/tmux/cmd-send-keys.c +++ b/usr.bin/tmux/cmd-send-keys.c @@ -1,4 +1,4 @@ -/* $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> @@ -39,7 +39,7 @@ const struct cmd_entry cmd_send_keys_entry = { .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 }; @@ -71,6 +71,8 @@ cmd_send_keys_inject_key(struct cmdq_item *item, struct cmdq_item *after, 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); |