Drop the ability to have a list of keys in the prefix in favour of two

separate options, prefix and prefix2. This simplifies the code and gets
rid the data options type which was only used for this one option.

Also add a -2 flag to send-prefix to send the secondary prefix key,
fixing a cause of minor irritation.

People who want three prefix keys are out of luck :-).
This commit is contained in:
Nicholas Marriott
2012-01-21 08:40:09 +00:00
parent 7f24020cbe
commit 535286c05a
9 changed files with 51 additions and 117 deletions

11
tmux.h
View File

@@ -673,9 +673,6 @@ struct options_entry {
char *str;
long long num;
void *data;
void (*freefn)(void *);
SPLAY_ENTRY(options_entry) entry;
};
@@ -685,9 +682,6 @@ struct options {
struct options *parent;
};
/* Key list for prefix option. */
ARRAY_DECL(keylist, int);
/* Scheduled job. */
struct job {
char *cmd;
@@ -1294,7 +1288,7 @@ SPLAY_HEAD(key_bindings, key_binding);
enum options_table_type {
OPTIONS_TABLE_STRING,
OPTIONS_TABLE_NUMBER,
OPTIONS_TABLE_KEYS,
OPTIONS_TABLE_KEY,
OPTIONS_TABLE_COLOUR,
OPTIONS_TABLE_ATTRIBUTES,
OPTIONS_TABLE_FLAG,
@@ -1413,9 +1407,6 @@ char *options_get_string(struct options *, const char *);
struct options_entry *options_set_number(
struct options *, const char *, long long);
long long options_get_number(struct options *, const char *);
struct options_entry *options_set_data(
struct options *, const char *, void *, void (*)(void *));
void *options_get_data(struct options *, const char *);
/* options-table.c */
extern const struct options_table_entry server_options_table[];