[Github-comments] [geany/geany] highlighting: added API call to query GeanyLexerStyle by name (#2336)

LarsGit223 notifications at xxxxx
Thu Oct 3 20:44:29 UTC 2019


LarsGit223 commented on this pull request.



> + * @return A pointer to the style struct.
+ */
+GEANY_API_SYMBOL
+const GeanyLexerStyle *highlighting_get_named_style(const gchar *named_style)
+{
+	GeanyLexerStyle *cs;
+	gchar *comma, *name = NULL;
+
+	g_return_val_if_fail(named_style, NULL);
+	name = utils_strdupa(named_style);	/* named_style must not be written to, may be a static string */
+
+	comma = strstr(name, ",");
+	if (comma)
+	{
+		*comma = '\0';	/* terminate name to make lookup work */
+	}

I removed it. It was a leftover copied in from ```read_named_style()```. But it doesn't make sense any more.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2336#discussion_r331244133
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20191003/66e100d4/attachment.html>


More information about the Github-comments mailing list