=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tty-keys.c,v retrieving revision 1.106 retrieving revision 1.107 diff -c -r1.106 -r1.107 *** src/usr.bin/tmux/tty-keys.c 2019/02/16 19:04:34 1.106 --- src/usr.bin/tmux/tty-keys.c 2019/03/18 11:58:40 1.107 *************** *** 1,4 **** ! /* $OpenBSD: tty-keys.c,v 1.106 2019/02/16 19:04:34 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tty-keys.c,v 1.107 2019/03/18 11:58:40 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 398,406 **** { const struct tty_default_key_raw *tdkr; const struct tty_default_key_code *tdkc; ! u_int i, size; const char *s, *value; struct options_entry *o; if (tty->key_tree != NULL) tty_keys_free(tty); --- 398,407 ---- { const struct tty_default_key_raw *tdkr; const struct tty_default_key_code *tdkc; ! u_int i; const char *s, *value; struct options_entry *o; + struct options_array_item *a; if (tty->key_tree != NULL) tty_keys_free(tty); *************** *** 423,433 **** } o = options_get(global_options, "user-keys"); ! if (o != NULL && options_array_size(o, &size) != -1) { ! for (i = 0; i < size; i++) { ! value = options_array_get(o, i); if (value != NULL) tty_keys_add(tty, value, KEYC_USER + i); } } } --- 424,436 ---- } o = options_get(global_options, "user-keys"); ! if (o != NULL) { ! a = options_array_first(o); ! while (a != NULL) { ! value = options_array_item_value(a); if (value != NULL) tty_keys_add(tty, value, KEYC_USER + i); + a = options_array_next(a); } } }