From 95850e1aca6697df784d02c24a0ca997f82f90f7 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 2 Nov 2017 18:43:51 +0000 Subject: Tweak previous slightly so that current session is chosen if it is in the group rather than first. --- format.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'format.c') 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; } -- cgit