diff --git a/src/plugindata.h b/src/plugindata.h index da943004..88d6fcbf 100644 --- a/src/plugindata.h +++ b/src/plugindata.h @@ -284,6 +284,7 @@ void plugin_cleanup(void); * - main_locale_init() * - geany_plugin_register() (and GEANY_PLUGIN_REGISTER()) * - geany_plugin_register_full() (and GEANY_PLUGIN_REGISTER_FULL()) + * - plugin_module_make_resident() * * @param plugin The unique plugin handle to your plugin. You must set some fields here. * diff --git a/src/plugins.c b/src/plugins.c index 4ac771f8..4d851ab7 100644 --- a/src/plugins.c +++ b/src/plugins.c @@ -613,6 +613,10 @@ static gpointer plugin_load_gmodule(GeanyPlugin *proxy, GeanyPlugin *subplugin, g_module_symbol(module, "geany_load_module", (void *) &p_geany_load_module); if (p_geany_load_module) { + /* set this here already so plugins can call i.e. plugin_module_make_resident() + * right from their geany_load_module() */ + subplugin->priv->proxy_data = module; + /* This is a new style plugin. It should fill in plugin->info and then call * geany_plugin_register() in its geany_load_module() to successfully load. * The ABI and API checks are performed by geany_plugin_register() (i.e. by us).