mirror of
https://github.com/tmate-io/tmate.git
synced 2025-01-23 14:28:55 +01: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>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -45,7 +45,7 @@ int
|
|||||||
cmd_bind_key_check(struct args *args)
|
cmd_bind_key_check(struct args *args)
|
||||||
{
|
{
|
||||||
if (args_has(args, 't')) {
|
if (args_has(args, 't')) {
|
||||||
if (args->argc != 1)
|
if (args->argc != 2)
|
||||||
return (-1);
|
return (-1);
|
||||||
} else {
|
} else {
|
||||||
if (args->argc < 2)
|
if (args->argc < 2)
|
||||||
@ -99,9 +99,9 @@ cmd_bind_key_table(struct cmd *self, struct cmd_ctx *ctx, int key)
|
|||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd = mode_key_fromstring(mtab->cmdstr, args->argv[0]);
|
cmd = mode_key_fromstring(mtab->cmdstr, args->argv[1]);
|
||||||
if (cmd == MODEKEY_NONE) {
|
if (cmd == MODEKEY_NONE) {
|
||||||
ctx->error(ctx, "unknown command: %s", args->argv[0]);
|
ctx->error(ctx, "unknown command: %s", args->argv[1]);
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user