aboutsummaryrefslogtreecommitdiff
path: root/format.c
diff options
context:
space:
mode:
authornicm <nicm>2017-11-02 18:43:51 +0000
committernicm <nicm>2017-11-02 18:43:51 +0000
commit95850e1aca6697df784d02c24a0ca997f82f90f7 (patch)
tree1a065e881718d2db8c73048c3410ccf520c4bfdc /format.c
parentc1f62f1fdebc3bd000b81bd93dcae6f1a539f345 (diff)
downloadrtmux-95850e1aca6697df784d02c24a0ca997f82f90f7.tar.gz
rtmux-95850e1aca6697df784d02c24a0ca997f82f90f7.tar.bz2
rtmux-95850e1aca6697df784d02c24a0ca997f82f90f7.zip
Tweak previous slightly so that current session is chosen if it is in
the group rather than first.
Diffstat (limited to 'format.c')
-rw-r--r--format.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/format.c b/format.c
index 8c5a0698..e254eb22 100644
--- a/format.c
+++ b/format.c
@@ -795,8 +795,11 @@ format_find(struct format_tree *ft, const char *key, int modifiers)
found = s;
goto found;
}
- if (fe->value == NULL && fe->cb != NULL)
+ if (fe->value == NULL && fe->cb != NULL) {
fe->cb(ft, fe);
+ if (fe->value == NULL)
+ fe->value = xstrdup("");
+ }
found = fe->value;
goto found;
}