mirror of
https://github.com/tmux/tmux.git
synced 2026-10-11 21:14:21 +00:00
Change array item keys to be strings instead of numbers which are
painful to work with.
This commit is contained in:
11
tty-keys.c
11
tty-keys.c
@@ -495,7 +495,6 @@ tty_keys_build(struct tty *tty)
|
||||
u_int i, j;
|
||||
const char *s;
|
||||
struct options_entry *o;
|
||||
struct options_array_item *a;
|
||||
union options_value *ov;
|
||||
char copy[16];
|
||||
key_code key;
|
||||
@@ -532,12 +531,10 @@ tty_keys_build(struct tty *tty)
|
||||
|
||||
o = options_get(global_options, "user-keys");
|
||||
if (o != NULL) {
|
||||
a = options_array_first(o);
|
||||
while (a != NULL) {
|
||||
i = options_array_item_index(a);
|
||||
ov = options_array_item_value(a);
|
||||
tty_keys_add(tty, ov->string, KEYC_USER + i);
|
||||
a = options_array_next(a);
|
||||
for (i = 0; i <= KEYC_NUSER; i++) {
|
||||
ov = options_array_getv(o, "%u", i);
|
||||
if (ov != NULL)
|
||||
tty_keys_add(tty, ov->string, KEYC_USER + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user