diff --git a/ChangeLog b/ChangeLog index 8559d445..a06cb740 100644 --- a/ChangeLog +++ b/ChangeLog @@ -40,13 +40,17 @@ CVS code - color_to_short()), and parse_colors(). (DLR) - Change color handling to save only the regex strings constantly, and to actually compile them on an as-needed - basis. Changes to update_color() (renamed color_update()) and + basis. Changes to update_color() and thanks_for_all_the_fish(). (Brand Huntsman and DLR) - Various other color fixes. Handle unspecified foreground - colors properly, and don't bother doing complete refreshes of - the screen when color support is enabled if there's no regex - associated with the current file. Changes to do_colorinit() - (renamed color_init()), do_input(), and do_output(). (DLR) + colors properly, don't automatically reinitialize the + displayed colors every time we update the current buffer's + colors (since the buffer may not be displayed immediately), + and don't bother doing complete refreshes of the screen when + color support is enabled if there's no regex associated with + the current file. Changes to do_colorinit() (renamed + color_init()), update_color() (renamed color_update()), + write_file(), do_input(), and do_output(). (DLR) - files.c: open_file() - Assert that filename isn't NULL, and don't do anything special diff --git a/src/color.c b/src/color.c index b1085822..c54a7bf8 100644 --- a/src/color.c +++ b/src/color.c @@ -161,8 +161,6 @@ void color_update(void) REG_EXTENDED | (tmpcolor->icase ? REG_ICASE : 0)); } } - - color_init(); } #endif /* ENABLE_COLOR */ diff --git a/src/files.c b/src/files.c index 871e7122..848136f0 100644 --- a/src/files.c +++ b/src/files.c @@ -1574,9 +1574,11 @@ int write_file(const char *name, FILE *f_open, bool tmp, int append, openfile->filename = mallocstrcpy(openfile->filename, realname); #ifdef ENABLE_COLOR - /* We might have changed the filename, so update the - * buffer's associated colors, if applicable. */ + /* We might have changed the filename, so update the colors + * to account for it, and make sure we're using the updated + * colors, if applicable. */ color_update(); + color_init(); /* If color syntaxes are available and turned on, we need to * call edit_refresh(). */