Commit 17ec14b9 authored by Chris Allegretta's avatar Chris Allegretta
Browse files

Better fix hopefully for color issue

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1430 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent a3daf3a2
Showing with 6 additions and 1 deletion
+6 -1
...@@ -11,7 +11,8 @@ CVS code ...@@ -11,7 +11,8 @@ CVS code
colortoint() colortoint()
- Don't bomb after invalid color and print bad color name - Don't bomb after invalid color and print bad color name
(David Benbennick). (David Benbennick).
- And reset mcolor to -1. colortoint, parse_colors()
- Don't add strings with invalid fg colors at all.
- nano.1, nano.1.html: - nano.1, nano.1.html:
- Add initialization file comments, change some options from - Add initialization file comments, change some options from
bracketed to underlined to emphasize that they are not bracketed to underlined to emphasize that they are not
......
...@@ -361,6 +361,10 @@ void parse_colors(char *ptr) ...@@ -361,6 +361,10 @@ void parse_colors(char *ptr)
fg = colortoint(fgstr, &bright); fg = colortoint(fgstr, &bright);
/* Don't try and parse screwed up fg colors */
if (fg == -1)
return;
if (syntaxes == NULL) { if (syntaxes == NULL) {
rcfile_error(_("Cannot add a color directive without a syntax line")); rcfile_error(_("Cannot add a color directive without a syntax line"));
return; return;
......
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