From 63169e79d0ae77c230cf21f8b93c6dbcf9fa1663 Mon Sep 17 00:00:00 2001 From: Kim Woelders Date: Sun, 21 Jan 2018 15:49:56 +0100 Subject: [PATCH] Fix theme variant handling The variant wasn't remembered persistently. Also change the theme variant delimiter to ':'. --- src/theme.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/theme.c b/src/theme.c index 9186c139..5be243d8 100644 --- a/src/theme.c +++ b/src/theme.c @@ -348,7 +348,7 @@ ThemeFind(const char *theme) if (p) snprintf(name, sizeof(name), "%s", p); - s = strchr(name, '='); + s = strchr(name, ':'); if (s) { *s++ = '\0'; @@ -366,8 +366,14 @@ ThemeFind(const char *theme) Mode.theme.paths); } - Efree(Conf.theme.name); - Conf.theme.name = ThemePathName(path); + if (theme) + { + Efree(Conf.theme.name); + if (isfile(theme)) + Conf.theme.name = ThemePathName(path); + else + Conf.theme.name = Estrdup(theme); + } Efree(Mode.theme.path); Mode.theme.path = (path) ? path : Estrdup("-");