diff options
author | nicm <nicm> | 2021-02-26 21:53:41 +0000 |
---|---|---|
committer | nicm <nicm> | 2021-02-26 21:53:41 +0000 |
commit | 583aaebc0ac437777ce796fc6cc29de7d488cf1a (patch) | |
tree | 1ef5d444e816f36b23d6b0f92565433270f11989 | |
parent | dd7006c850e1f973c214f70eee87a054b00f19e7 (diff) | |
download | rtmux-583aaebc0ac437777ce796fc6cc29de7d488cf1a.tar.gz rtmux-583aaebc0ac437777ce796fc6cc29de7d488cf1a.tar.bz2 rtmux-583aaebc0ac437777ce796fc6cc29de7d488cf1a.zip |
Check session, window, pane in the right order when working out format type.
-rw-r--r-- | format.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -4696,12 +4696,12 @@ format_defaults(struct format_tree *ft, struct client *c, struct session *s, if (c != NULL && s != NULL && c->session != s) log_debug("%s: session does not match", __func__); - if (s != NULL) - ft->type = FORMAT_TYPE_SESSION; + if (wp != NULL) + ft->type = FORMAT_TYPE_PANE; else if (wl != NULL) ft->type = FORMAT_TYPE_WINDOW; - else if (wp != NULL) - ft->type = FORMAT_TYPE_PANE; + else if (s != NULL) + ft->type = FORMAT_TYPE_SESSION; else ft->type = FORMAT_TYPE_UNKNOWN; |