files: reinitialize the palette only when the syntax actually changed

This commit is contained in:
Benno Schulenberg 2020-04-28 15:28:26 +02:00
parent e62a6964f7
commit b97da1dfe4

View File

@ -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