patch 8.0.0755: terminal window does not have colors in the GUI

Problem:    Terminal window does not have colors in the GUI.
Solution:   Lookup the GUI color.
diff --git a/src/syntax.c b/src/syntax.c
index 4cd753c..6fdc2af 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -7908,7 +7908,7 @@
 		    HL_TABLE()[idx].sg_gui_fg = i;
 # endif
 		    vim_free(HL_TABLE()[idx].sg_gui_fg_name);
-		    if (STRCMP(arg, "NONE"))
+		    if (STRCMP(arg, "NONE") != 0)
 			HL_TABLE()[idx].sg_gui_fg_name = vim_strsave(arg);
 		    else
 			HL_TABLE()[idx].sg_gui_fg_name = NULL;
@@ -8789,12 +8789,31 @@
 {
     attrentry_T		at_en;
 
+    vim_memset(&at_en, 0, sizeof(attrentry_T));
     at_en.ae_attr = attr;
     at_en.ae_u.cterm.fg_color = fg;
     at_en.ae_u.cterm.bg_color = bg;
     return get_attr_entry(&cterm_attr_table, &at_en);
 }
 
+#if defined(FEAT_GUI) || defined(PROTO)
+/*
+ * Get an attribute index for a cterm entry.
+ * Uses an existing entry when possible or adds one when needed.
+ */
+    int
+get_gui_attr_idx(int attr, guicolor_T fg, guicolor_T bg)
+{
+    attrentry_T		at_en;
+
+    vim_memset(&at_en, 0, sizeof(attrentry_T));
+    at_en.ae_attr = attr;
+    at_en.ae_u.gui.fg_color = fg;
+    at_en.ae_u.gui.bg_color = bg;
+    return get_attr_entry(&gui_attr_table, &at_en);
+}
+#endif
+
 /*
  * Clear all highlight tables.
  */