summaryrefslogtreecommitdiff
path: root/src/fe-common
diff options
context:
space:
mode:
authorailin-nemui <ailin-nemui@users.noreply.github.com>2018-02-16 13:46:29 +0100
committerailin-nemui <ailin-nemui@users.noreply.github.com>2018-02-16 13:46:29 +0100
commit203f6c532947e8b7c7e30fad91220aad083c7f08 (patch)
tree6e19a79123422cbf2173fa7d58538b2c018cbc00 /src/fe-common
parenta72e706667e963a013ca8c8fd02af1c74ffbd40d (diff)
downloadirssi-203f6c532947e8b7c7e30fad91220aad083c7f08.zip
also unblock theme elements when processing finished
Diffstat (limited to 'src/fe-common')
-rw-r--r--src/fe-common/core/themes.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/fe-common/core/themes.c b/src/fe-common/core/themes.c
index 5a817daa..e9818be9 100644
--- a/src/fe-common/core/themes.c
+++ b/src/fe-common/core/themes.c
@@ -413,7 +413,7 @@ static char *theme_format_expand_abstract(THEME_REC *theme, const char **formatp
{
GString *str;
const char *p, *format;
- char *abstract, *data, *ret;
+ char *abstract, *data, *ret, *blocking;
theme_rm_col default_fg, default_bg;
int len;
@@ -455,8 +455,10 @@ static char *theme_format_expand_abstract(THEME_REC *theme, const char **formatp
/* unknown abstract, just display the data */
data = "$0-";
g_free(abstract);
+ blocking = NULL;
} else {
- g_tree_insert(block_list, abstract, abstract);
+ blocking = abstract;
+ g_tree_insert(block_list, blocking, blocking);
}
abstract = g_strdup(data);
@@ -503,6 +505,9 @@ static char *theme_format_expand_abstract(THEME_REC *theme, const char **formatp
ret = theme_format_expand_data_rec(theme, &p, default_fg, default_bg, last_fg, last_bg,
flags | EXPAND_FLAG_LASTCOLOR_ARG, block_list);
g_free(abstract);
+ if (blocking != NULL) {
+ g_tree_remove(block_list, blocking);
+ }
g_tree_unref(block_list);
return ret;
}