Patch 7.4.1854
Problem: When setting 'termguicolors' the Ignore highlighting doesn't work.
(Charles Campbell)
Solution: Handle the color names "fg" and "bg" when the GUI isn't running
and no colors are speficied, fall back to black and white.
Files: src/syntax.c
*** ../vim-7.4.1853/src/syntax.c 2016-05-01 13:09:53.862174566 +0200
--- src/syntax.c 2016-05-28 15:45:09.006541498 +0200
***************
*** 8486,8496 ****
#ifdef FEAT_GUI
return gui.norm_pixel;
#endif
- #if defined(FEAT_TERMGUICOLORS) && defined(FEAT_GUI)
- else
- #endif
#ifdef FEAT_TERMGUICOLORS
return cterm_normal_fg_gui_color;
#endif
}
if (STRICMP(name, "bg") == 0 || STRICMP(name, "background") == 0)
--- 8486,8496 ----
#ifdef FEAT_GUI
return gui.norm_pixel;
#endif
#ifdef FEAT_TERMGUICOLORS
+ if (cterm_normal_fg_gui_color != (long_u)INVALCOLOR)
return cterm_normal_fg_gui_color;
+ /* Guess that the foreground is black or white. */
+ return GUI_GET_COLOR((char_u *)(*p_bg == 'l' ? "black" : "white"));
#endif
}
if (STRICMP(name, "bg") == 0 || STRICMP(name, "background") == 0)
***************
*** 8501,8511 ****
#ifdef FEAT_GUI
return gui.back_pixel;
#endif
- #if defined(FEAT_TERMGUICOLORS) && defined(FEAT_GUI)
- else
- #endif
#ifdef FEAT_TERMGUICOLORS
return cterm_normal_bg_gui_color;
#endif
}
--- 8501,8511 ----
#ifdef FEAT_GUI
return gui.back_pixel;
#endif
#ifdef FEAT_TERMGUICOLORS
+ if (cterm_normal_bg_gui_color != (long_u)INVALCOLOR)
return cterm_normal_bg_gui_color;
+ /* Guess that the background is white or black. */
+ return GUI_GET_COLOR((char_u *)(*p_bg == 'l' ? "white" : "black"));
#endif
}
***************
*** 8595,8601 ****
&& aep->ae_u.cterm.bg_rgb
== taep->ae_u.cterm.bg_rgb
#endif
-
)))
return i + ATTR_OFF;
--- 8595,8600 ----
*** ../vim-7.4.1853/src/version.c 2016-05-28 14:16:05.290615005 +0200
--- src/version.c 2016-05-28 15:52:59.014535033 +0200
***************
*** 755,756 ****
--- 755,758 ----
{ /* Add new patch number below this line */
+ /**/
+ 1854,
/**/
--
If they don't keep on exercising their lips, he thought, their brains
start working.
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.