summaryrefslogtreecommitdiffstats
path: root/cmd-send-prefix.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-09-22 12:38:10 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-09-22 12:38:10 +0000
commit96dd3e8eb9bbe5393050acfd4ac7759ae27d00c8 (patch)
treee637c693907a716deeef38264004b9bcc6d24971 /cmd-send-prefix.c
parent6fab9a3e6f0a18ce63662fceedb87e96f2680d83 (diff)
Permit multiple prefix keys to be defined, separated by commas, for example:
set -g prefix ^a,^b Any key in the list acts as the prefix. The send-prefix command always sends the first key in the list.
Diffstat (limited to 'cmd-send-prefix.c')
-rw-r--r--cmd-send-prefix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd-send-prefix.c b/cmd-send-prefix.c
index aeefc701..a149fdac 100644
--- a/cmd-send-prefix.c
+++ b/cmd-send-prefix.c
@@ -43,13 +43,13 @@ cmd_send_prefix_exec(struct cmd *self, struct cmd_ctx *ctx)
struct cmd_target_data *data = self->data;
struct session *s;
struct window_pane *wp;
- int key;
+ struct keylist *keylist;
if (cmd_find_pane(ctx, data->target, &s, &wp) == NULL)
return (-1);
- key = options_get_number(&s->options, "prefix");
- window_pane_key(wp, ctx->curclient, key);
+ keylist = options_get_data(&s->options, "prefix");
+ window_pane_key(wp, ctx->curclient, ARRAY_FIRST(keylist));
return (0);
}