From 5cadadd4c28256d8ffbfab240e769808ecd8a2f9 Mon Sep 17 00:00:00 2001
From: David Lawrence Ramsey <pooka109@gmail.com>
Date: Sun, 28 May 2006 18:51:48 +0000
Subject: [PATCH] in color_update(), fix incorrect setting of defcolor, which
 prevented the reserved "default" syntax from being handled correctly

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3592 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 ChangeLog   | 4 ++++
 src/color.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 8eb724a8..2823ff29 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -128,6 +128,10 @@ CVS code -
 	- Rename variable editline to line, for consistency. (DLR)
 	- Change variable i from an int to a size_t in order to match
 	  selected, which it's compared against. (DLR)
+- color.c:
+  color_update()
+	- Fix incorrect setting of defcolor, which prevented the
+	  reserved "default" syntax from being handled correctly. (DLR)
 - cut.c:
   cut_to_eof()
 	- New function, containing the main functionality of
diff --git a/src/color.c b/src/color.c
index fb7533f5..57d0a9cb 100644
--- a/src/color.c
+++ b/src/color.c
@@ -142,7 +142,7 @@ void color_update(void)
 	     * syntax names elsewhere.)  Skip over it here, but keep
 	     * track of its color regexes. */
 	    if (strcmp(tmpsyntax->desc, "default") == 0) {
-		defcolor = syntaxes->color;
+		defcolor = tmpsyntax->color;
 		continue;
 	    }
 
-- 
GitLab