patch 8.1.1230: a lot of code is shared between vim.exe and gvim.exe
Problem: A lot of code is shared between vim.exe and gvim.exe.
Solution: Optionally put the shared code in vim.dll. (Ken Takata,
closes #4287)
diff --git a/src/syntax.c b/src/syntax.c
index 7545165..b492505 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -8280,6 +8280,13 @@
* background/foreground colors. */
mch_set_normal_colors();
#else
+# ifdef VIMDLL
+ if (!gui.in_use)
+ {
+ mch_set_normal_colors();
+ return;
+ }
+# endif
cterm_normal_fg_color = 0;
cterm_normal_fg_bold = 0;
cterm_normal_bg_color = 0;
@@ -9823,7 +9830,7 @@
#endif
#if (defined(MSWIN) \
- && !defined(FEAT_GUI_MSWIN) \
+ && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL)) \
&& defined(FEAT_TERMGUICOLORS)) || defined(PROTO)
void
syn_id2cterm_bg(int hl_id, int *fgp, int *bgp)