Commit cb8d845a authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

still more miscellaneous color fixes

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2869 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent 538dc352
Showing with 13 additions and 9 deletions
+13 -9
...@@ -40,13 +40,17 @@ CVS code - ...@@ -40,13 +40,17 @@ CVS code -
color_to_short()), and parse_colors(). (DLR) color_to_short()), and parse_colors(). (DLR)
- Change color handling to save only the regex strings - Change color handling to save only the regex strings
constantly, and to actually compile them on an as-needed 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) thanks_for_all_the_fish(). (Brand Huntsman and DLR)
- Various other color fixes. Handle unspecified foreground - Various other color fixes. Handle unspecified foreground
colors properly, and don't bother doing complete refreshes of colors properly, don't automatically reinitialize the
the screen when color support is enabled if there's no regex displayed colors every time we update the current buffer's
associated with the current file. Changes to do_colorinit() colors (since the buffer may not be displayed immediately),
(renamed color_init()), do_input(), and do_output(). (DLR) 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: - files.c:
open_file() open_file()
- Assert that filename isn't NULL, and don't do anything special - Assert that filename isn't NULL, and don't do anything special
......
...@@ -161,8 +161,6 @@ void color_update(void) ...@@ -161,8 +161,6 @@ void color_update(void)
REG_EXTENDED | (tmpcolor->icase ? REG_ICASE : 0)); REG_EXTENDED | (tmpcolor->icase ? REG_ICASE : 0));
} }
} }
color_init();
} }
#endif /* ENABLE_COLOR */ #endif /* ENABLE_COLOR */
...@@ -1574,9 +1574,11 @@ int write_file(const char *name, FILE *f_open, bool tmp, int append, ...@@ -1574,9 +1574,11 @@ int write_file(const char *name, FILE *f_open, bool tmp, int append,
openfile->filename = mallocstrcpy(openfile->filename, openfile->filename = mallocstrcpy(openfile->filename,
realname); realname);
#ifdef ENABLE_COLOR #ifdef ENABLE_COLOR
/* We might have changed the filename, so update the /* We might have changed the filename, so update the colors
* buffer's associated colors, if applicable. */ * to account for it, and make sure we're using the updated
* colors, if applicable. */
color_update(); color_update();
color_init();
/* If color syntaxes are available and turned on, we need to /* If color syntaxes are available and turned on, we need to
* call edit_refresh(). */ * call edit_refresh(). */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment