diff src/evalfunc.c @ 27863:f1799ba16729 v8.2.4457

patch 8.2.4457: the GPM library can only be linked statically Commit: https://github.com/vim/vim/commit/33fc4a63071c03ad46636b345a814e7e6d8f4ae0 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Feb 23 18:07:38 2022 +0000 patch 8.2.4457: the GPM library can only be linked statically Problem: The GPM library can only be linked statically. Solution: Make it possible to load the GPM library dynamically. (Damien)
author Bram Moolenaar <Bram@vim.org>
date Wed, 23 Feb 2022 19:15:03 +0100
parents 3cb1a109e987
children 05d222e5246a
line wrap: on
line diff
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -5786,7 +5786,7 @@ f_has(typval_T *argvars, typval_T *rettv
 #endif
 		},
 	{"mouse_gpm",
-#if (defined(UNIX) || defined(VMS)) && defined(FEAT_MOUSE_GPM)
+#if (defined(UNIX) || defined(VMS)) && defined(FEAT_MOUSE_GPM) && !defined(DYNAMIC_GPM)
 		1
 #else
 		0
@@ -6392,6 +6392,10 @@ f_has(typval_T *argvars, typval_T *rettv
 	else if (STRICMP(name, "terminal") == 0)
 	    n = terminal_enabled();
 #endif
+#ifdef DYNAMIC_GPM
+	else if (STRICMP(name, "mouse_gpm") == 0)
+	    n = gpm_available();
+#endif
     }
 
     // features not in has_list[]