=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-send-keys.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- src/usr.bin/tmux/cmd-send-keys.c 2016/12/08 22:15:37 1.35 +++ src/usr.bin/tmux/cmd-send-keys.c 2016/12/11 22:55:25 1.36 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-send-keys.c,v 1.35 2016/12/08 22:15:37 nicm Exp $ */ +/* $OpenBSD: cmd-send-keys.c,v 1.36 2016/12/11 22:55:25 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -77,6 +77,8 @@ free(cause); return (CMD_RETURN_ERROR); } + if (args_has(args, 'X') || args->argc == 0) + wp->modeprefix = np; } if (args_has(args, 'X')) { @@ -84,7 +86,6 @@ cmdq_error(item, "not in a mode"); return (CMD_RETURN_ERROR); } - wp->modeprefix = np; if (!m->valid) wp->mode->command(wp, c, s, args, NULL); else