patch 8.2.2821: MS-Windows: unnessarily loading libraries when registering OLE
Problem: MS-Windows: unnessarily loading libraries when registering OLE.
Solution: Skip loading libraries when invoked with "-register".
diff --git a/src/os_win32.c b/src/os_win32.c
index d40d033..3bfeee6 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -529,6 +529,10 @@
{
HINSTANCE dll = NULL;
+ // No need to load any library when registering OLE.
+ if (found_register_arg)
+ return dll;
+
// NOTE: Do not use mch_dirname() and mch_chdir() here, they may call
// vimLoadLib() recursively, which causes a stack overflow.
if (exe_path == NULL)