mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 11:18:48 +00:00
Sync OpenBSD patchset 847:
Fix bind-key -t.
This commit is contained in:
parent
1930181b18
commit
e3defd9b25
@ -1,4 +1,4 @@
|
||||
/* $Id: cmd-bind-key.c,v 1.30 2011-01-07 14:45:33 tcunha Exp $ */
|
||||
/* $Id: cmd-bind-key.c,v 1.31 2011-01-22 00:00:23 tcunha Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -45,7 +45,7 @@ int
|
||||
cmd_bind_key_check(struct args *args)
|
||||
{
|
||||
if (args_has(args, 't')) {
|
||||
if (args->argc != 1)
|
||||
if (args->argc != 2)
|
||||
return (-1);
|
||||
} else {
|
||||
if (args->argc < 2)
|
||||
@ -99,9 +99,9 @@ cmd_bind_key_table(struct cmd *self, struct cmd_ctx *ctx, int key)
|
||||
return (-1);
|
||||
}
|
||||
|
||||
cmd = mode_key_fromstring(mtab->cmdstr, args->argv[0]);
|
||||
cmd = mode_key_fromstring(mtab->cmdstr, args->argv[1]);
|
||||
if (cmd == MODEKEY_NONE) {
|
||||
ctx->error(ctx, "unknown command: %s", args->argv[0]);
|
||||
ctx->error(ctx, "unknown command: %s", args->argv[1]);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user