Sync OpenBSD patchset 1007:

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:
Tiago Cunha
2012-01-21 19:36:40 +00:00
parent d4c2a935f2
commit a7b0b30bdd
9 changed files with 51 additions and 117 deletions

11
tmux.h
View File

@@ -669,9 +669,6 @@ struct options_entry {
char *str;
long long num;
void *data;
void (*freefn)(void *);
SPLAY_ENTRY(options_entry) entry;
};
@@ -681,9 +678,6 @@ struct options {
struct options *parent;
};
/* Key list for prefix option. */
ARRAY_DECL(keylist, int);
/* Scheduled job. */
struct job {
char *cmd;
@@ -1290,7 +1284,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,
@@ -1409,9 +1403,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[];