From 051037736d523d827d4ec33f3d2390c4b0a42d51 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 15 Oct 2021 10:39:22 +0000 Subject: [PATCH] Do not send any key if -N flag is given even if no other arguments, fixes problem with repeat in copy mode reported by tb@. --- usr.bin/tmux/cmd-send-keys.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.bin/tmux/cmd-send-keys.c b/usr.bin/tmux/cmd-send-keys.c index f673394a468..9e5adf895fa 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.69 2021/10/05 12:49:37 nicm Exp $ */ +/* $OpenBSD: cmd-send-keys.c,v 1.70 2021/10/15 10:39:22 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -203,6 +203,8 @@ cmd_send_keys_exec(struct cmd *self, struct cmdq_item *item) } if (count == 0) { + if (args_has(args, 'N')) + return (CMD_RETURN_NORMAL); for (; np != 0; np--) cmd_send_keys_inject_key(item, NULL, event->key); return (CMD_RETURN_NORMAL); -- 2.20.1