From b97da1dfe41ad2fc8396fb038d300f4d9b7594df Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Tue, 28 Apr 2020 15:28:26 +0200 Subject: [PATCH] files: reinitialize the palette only when the syntax actually changed --- src/files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/files.c b/src/files.c index 8bbbcbaa..d0fc2655 100644 --- a/src/files.c +++ b/src/files.c @@ -1972,7 +1972,6 @@ bool write_file(const char *name, FILE *thefile, bool tmp, #ifdef ENABLE_COLOR /* See if the applicable syntax has changed. */ color_update(); - color_init(); newname = openfile->syntax ? openfile->syntax->name : ""; @@ -1987,6 +1986,7 @@ bool write_file(const char *name, FILE *thefile, bool tmp, } precalc_multicolorinfo(); + have_palette = FALSE; refresh_needed = TRUE; } #endif