From fce56c56efc57e80cc3ed755c192cf88822ebf0e Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 20 Nov 2015 12:01:19 +0000 Subject: Instead of separate tables for different types of options, give each option a scope type (server, session, window) in one table. --- status.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'status.c') diff --git a/status.c b/status.c index e09ac592..cbba2ead 100644 --- a/status.c +++ b/status.c @@ -1205,19 +1205,7 @@ status_prompt_complete_list(u_int *size, const char *s) list[(*size)++] = (*cmdent)->name; } } - for (oe = server_options_table; oe->name != NULL; oe++) { - if (strncmp(oe->name, s, strlen(s)) == 0) { - list = xreallocarray(list, (*size) + 1, sizeof *list); - list[(*size)++] = oe->name; - } - } - for (oe = session_options_table; oe->name != NULL; oe++) { - if (strncmp(oe->name, s, strlen(s)) == 0) { - list = xreallocarray(list, (*size) + 1, sizeof *list); - list[(*size)++] = oe->name; - } - } - for (oe = window_options_table; oe->name != NULL; oe++) { + for (oe = options_table; oe->name != NULL; oe++) { if (strncmp(oe->name, s, strlen(s)) == 0) { list = xreallocarray(list, (*size) + 1, sizeof *list); list[(*size)++] = oe->name; -- cgit