mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
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.
This commit is contained in:
7
tmux.c
7
tmux.c
@ -309,6 +309,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;
|
||||
@ -409,7 +410,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);
|
||||
@ -439,6 +439,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);
|
||||
|
Reference in New Issue
Block a user