Check session, window, pane in the right order when working out format type.

pull/2599/head
nicm 2021-02-26 21:53:41 +00:00
parent dd7006c850
commit 583aaebc0a
1 changed files with 4 additions and 4 deletions

View File

@ -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;