Commits

ZyX_I committed 05f839c

Fixed FIXMEs. Still need to fix Normal group handling

  • Participants
  • Parent commits 5e3877f

Comments (0)

Files changed (3)

     pattr->undercurl = (highlight_has_attr(hl_id, HL_UNDERCURL, modec) != NULL);
 
     /* FIXME Support FEAT_XTERM_RGB */
-# ifdef FEAT_GUI
-    if (gui.in_use)
+# if defined(FEAT_GUI) || defined(FEAT_XTERM_RGB)
+    if (gui.in_use
+#  ifdef FEAT_XTERM_RGB
+	    || p_guicolors
+#  endif
+	    )
     {
 	bg_color = highlight_gui_color_rgb(hl_id, FALSE);
 	if (bg_color == PRCOLOR_BLACK)
 	    if (spell_aep != NULL)
 	    {
 		new_en.ae_attr |= spell_aep->ae_attr;
-		/* FIXME Check whether something needs to be done with this */
 		if (spell_aep->ae_u.cterm.fg_color > 0)
 		    new_en.ae_u.cterm.fg_color = spell_aep->ae_u.cterm.fg_color;
 		if (spell_aep->ae_u.cterm.bg_color > 0)
 		    new_en.ae_u.cterm.bg_color = spell_aep->ae_u.cterm.bg_color;
+#ifdef FEAT_XTERM_RGB
+		if (spell_aep->ae_u.cterm.fg_rgb != INVALCOLOR)
+		    new_en.ae_u.cterm.fg_rgb = spell_aep->ae_u.cterm.fg_rgb;
+		if (spell_aep->ae_u.cterm.bg_rgb != INVALCOLOR)
+		    new_en.ae_u.cterm.bg_rgb = spell_aep->ae_u.cterm.bg_rgb;
+#endif
 	    }
 	}
 	return get_attr_entry(&cterm_attr_table, &new_en);
 }
 #endif
 
-#if (defined(FEAT_SYN_HL) && defined(FEAT_GUI) && defined(FEAT_PRINTER)) \
-	|| defined(PROTO)
+#if (defined(FEAT_SYN_HL) && (defined(FEAT_GUI) || defined(FEAT_XTERM_RGB)) \
+	&& defined(FEAT_PRINTER)) || defined(PROTO)
 /*
  * Return color name of highlight group "id" as RGB value.
  */
     return 0x1ffffff;
 }
 
+/*
+ * Returns RGB color for given name. Used only if vim is compiled without GUI 
+ * support, otherwise GUI function is used for the task, even when run in 
+ * terminal.
+ */
     guicolor_T
 gui_mch_get_color(char_u *name)
 {