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/evalfunc.c b/src/evalfunc.c
index 509a31f..e65ab94 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -4201,11 +4201,13 @@
{
#ifdef FEAT_GUI
if (gui.in_use)
+ {
gui_mch_set_foreground();
-#else
-# ifdef MSWIN
+ return;
+ }
+#endif
+#if defined(MSWIN) && (!defined(FEAT_GUI) || defined(VIMDLL))
win32_set_foreground();
-# endif
#endif
}