@elextr commented on this pull request.


In src/pluginextension.c:

> + */
+#define CALL_PROVIDED(f, doc, ext)												\
+	G_STMT_START {																\
+		for (GList *node = all_extensions; node; node = node->next)				\
+		{																		\
+			PluginExtensionEntry *entry = node->data;							\
+																				\
+			if (entry->extension->f && entry->extension->f(doc, entry->data))	\
+				return (ext) ? entry->extension == (ext) : TRUE;				\
+																				\
+			if ((ext) && entry->extension == (ext))								\
+				return FALSE;													\
+		}																		\
+		return FALSE;															\
+	} G_STMT_END
+

True, I omitted that Geany will still walk the per extension list until it finds an extension that accepts its request, but at least its only walking a list of the extensions that offer that feature, I would expect most extensions (other than LSP) will only offer one or two features.

But as you say, for now its not critical, but what would be a Geany discussion without a little premature optimisation 😁?


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/pull/3849/review/2136016260@github.com>