Tweak previous slightly so that current session is chosen if it is in

the group rather than first.
This commit is contained in:
nicm
2017-11-02 18:43:51 +00:00
parent c1f62f1fde
commit 95850e1aca
2 changed files with 12 additions and 5 deletions

View File

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