aboutsummaryrefslogtreecommitdiff
path: root/tmux.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-09-22 14:22:21 +0000
committerTiago Cunha <tcunha@gmx.com>2009-09-22 14:22:21 +0000
commitdf7b68480cf37f4039a5fd1809fd7c8dbf127277 (patch)
tree4e764c63c18a86cd683cabe5bdf1817d970dfb03 /tmux.c
parent31ccf2f8134538bd3f4b2bad0d092536b3adb519 (diff)
downloadrtmux-df7b68480cf37f4039a5fd1809fd7c8dbf127277.tar.gz
rtmux-df7b68480cf37f4039a5fd1809fd7c8dbf127277.tar.bz2
rtmux-df7b68480cf37f4039a5fd1809fd7c8dbf127277.zip
Sync OpenBSD patchset 343:
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 'tmux.c')
-rw-r--r--tmux.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tmux.c b/tmux.c
index 3e9affc1..1a4a01c9 100644
--- a/tmux.c
+++ b/tmux.c
@@ -1,4 +1,4 @@
-/* $Id: tmux.c,v 1.172 2009-09-19 18:53:01 tcunha Exp $ */
+/* $Id: tmux.c,v 1.173 2009-09-22 14:22:21 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -318,6 +318,7 @@ main(int argc, char **argv)
enum msgtype msg;
struct passwd *pw;
struct options *so, *wo;
+ struct keylist *keylist;
char *s, *path, *label, *home, *cause, **var;
char cwd[MAXPATHLEN];
void *buf;
@@ -418,7 +419,6 @@ main(int argc, char **argv)
options_set_number(so, "message-attr", 0);
options_set_number(so, "message-bg", 3);
options_set_number(so, "message-fg", 0);
- options_set_number(so, "prefix", '\002');
options_set_number(so, "repeat-time", 500);
options_set_number(so, "set-remain-on-exit", 0);
options_set_number(so, "set-titles", 0);
@@ -448,6 +448,11 @@ main(int argc, char **argv)
options_set_number(so, "visual-bell", 0);
options_set_number(so, "visual-content", 0);
+ keylist = xmalloc(sizeof *keylist);
+ ARRAY_INIT(keylist);
+ ARRAY_ADD(keylist, '\002');
+ options_set_data(so, "prefix", keylist, xfree);
+
options_init(&global_w_options, NULL);
wo = &global_w_options;
options_set_number(wo, "aggressive-resize", 0);