diff options
author | Michael Vetter <jubalh@iodoru.org> | 2019-08-23 13:54:09 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2019-08-23 13:54:09 +0200 |
commit | 023e2dc387e157882f5d1d903984f379c9a63a2c (patch) | |
tree | ced6920d2b9c0c8c32f92ee053099cae883c1cdf | |
parent | df1b19ecec7f94608fba2c0d5e15a1e9ed16a6ac (diff) | |
download | profani-tty-023e2dc387e157882f5d1d903984f379c9a63a2c.tar.gz |
Reset color pairs when new theme is loaded
We only need the colour pairs initialized that the theme actually uses. It's otherwise possible that we run over the max value of initialzed pairs.
-rw-r--r-- | src/config/theme.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/config/theme.c b/src/config/theme.c index f160fa7a..e0c9d541 100644 --- a/src/config/theme.c +++ b/src/config/theme.c @@ -176,6 +176,8 @@ theme_exists(const char *const theme_name) gboolean theme_load(const char *const theme_name) { + color_pair_cache_reset(); + if (_theme_load_file(theme_name)) { _load_preferences(); return TRUE; |