From 023e2dc387e157882f5d1d903984f379c9a63a2c Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Fri, 23 Aug 2019 13:54:09 +0200 Subject: [PATCH] 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. --- src/config/theme.c | 2 ++ 1 file changed, 2 insertions(+) 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;