diff options
author | Thomas Adam <thomas@xteddy.org> | 2019-04-23 23:02:42 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2019-04-23 23:02:42 +0100 |
commit | c86936613366fe1a0d7a4a2d4ae628d04cd3b866 (patch) | |
tree | 88c945ce503cb9df4332904d5887d68b8b843fde /status.c | |
parent | b0d7623b7eb4409eedde0583be6ed831b287d278 (diff) | |
parent | b9022e33eac0152850ae59be99b54cccc10f4c63 (diff) | |
download | rtmux-c86936613366fe1a0d7a4a2d4ae628d04cd3b866.tar.gz rtmux-c86936613366fe1a0d7a4a2d4ae628d04cd3b866.tar.bz2 rtmux-c86936613366fe1a0d7a4a2d4ae628d04cd3b866.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'status.c')
-rw-r--r-- | status.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -323,8 +323,8 @@ status_redraw(struct client *c) u_int lines, i, width = c->tty.sx; int flags, force = 0, changed = 0; struct options_entry *o; + union options_value *ov; struct format_tree *ft; - const char *fmt; char *expanded; log_debug("%s enter", __func__); @@ -370,14 +370,14 @@ status_redraw(struct client *c) for (i = 0; i < lines; i++) { screen_write_cursormove(&ctx, 0, i, 0); - fmt = options_array_get(o, i); - if (fmt == NULL) { + ov = options_array_get(o, i); + if (ov == NULL) { screen_write_clearline(&ctx, gc.bg); continue; } sle = &sl->entries[i]; - expanded = format_expand_time(ft, fmt); + expanded = format_expand_time(ft, ov->string); if (!force && sle->expanded != NULL && strcmp(expanded, sle->expanded) == 0) { @@ -1293,6 +1293,7 @@ status_prompt_complete_list(u_int *size, const char *s) size_t slen = strlen(s), valuelen; struct options_entry *o; struct options_array_item *a; + union options_value *ov; const char *layouts[] = { "even-horizontal", "even-vertical", "main-horizontal", "main-vertical", "tiled", NULL @@ -1321,10 +1322,13 @@ status_prompt_complete_list(u_int *size, const char *s) if (o != NULL) { a = options_array_first(o); while (a != NULL) { - value = options_array_item_value(a);; - if (value == NULL || (cp = strchr(value, '=')) == NULL) + ov = options_array_item_value(a); + if (ov == NULL) goto next; + value = ov->string; + if ((cp = strchr(value, '=')) == NULL) + goto next; valuelen = cp - value; if (slen > valuelen || strncmp(value, s, slen) != 0) goto next; |