aboutsummaryrefslogtreecommitdiff
path: root/cmd-parse.y
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2019-09-11 16:48:58 +0100
committerThomas Adam <thomas@xteddy.org>2019-09-11 16:48:58 +0100
commit658ecb0777bd1dea90fe50bc55381340e2eb7a37 (patch)
tree019fedc58d88808c7f27a85385917a08b653dcc3 /cmd-parse.y
parent2e90841f2ed4fbe0bb13681c9a90e355fe98ab1d (diff)
parent0feae4d8ae4190b89f486fddab10a691cc7a8fd3 (diff)
downloadrtmux-658ecb0777bd1dea90fe50bc55381340e2eb7a37.tar.gz
rtmux-658ecb0777bd1dea90fe50bc55381340e2eb7a37.tar.bz2
rtmux-658ecb0777bd1dea90fe50bc55381340e2eb7a37.zip
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-parse.y')
-rw-r--r--cmd-parse.y16
1 files changed, 8 insertions, 8 deletions
diff --git a/cmd-parse.y b/cmd-parse.y
index 6d2b970c..b0a42f7c 100644
--- a/cmd-parse.y
+++ b/cmd-parse.y
@@ -176,18 +176,18 @@ expanded : format
struct cmd_parse_input *pi = ps->input;
struct format_tree *ft;
struct client *c = pi->c;
- struct cmd_find_state *fs;
+ struct cmd_find_state *fsp;
+ struct cmd_find_state fs;
int flags = FORMAT_NOJOBS;
if (cmd_find_valid_state(&pi->fs))
- fs = &pi->fs;
- else
- fs = NULL;
+ fsp = &pi->fs;
+ else {
+ cmd_find_from_client(&fs, c, 0);
+ fsp = &fs;
+ }
ft = format_create(NULL, pi->item, FORMAT_NONE, flags);
- if (fs != NULL)
- format_defaults(ft, c, fs->s, fs->wl, fs->wp);
- else
- format_defaults(ft, c, NULL, NULL, NULL);
+ format_defaults(ft, c, fsp->s, fsp->wl, fsp->wp);
$$ = format_expand(ft, $1);
format_free(ft);