[geany/geany-plugins] f81070: Update ao_colortip.c

Devyn Collier Johnson git-noreply at xxxxx
Sat Jul 13 04:37:32 UTC 2019


Branch:      refs/heads/master
Author:      Devyn Collier Johnson <DevynCJohnson at Gmail.com>
Committer:   GitHub <noreply at github.com>
Date:        Sat, 13 Jul 2019 04:37:32 UTC
Commit:      f8107019a396034a1ed783e3989bf663c03c788c
             https://github.com/geany/geany-plugins/commit/f8107019a396034a1ed783e3989bf663c03c788c

Log Message:
-----------
Update ao_colortip.c

Added code needed to show hexadecimal numbers as colors. This is useful for any computer languages and/or syntax that represents numbers in the format `0x123456` (such as the colorscheme themes in Geany).


Modified Paths:
--------------
    addons/src/ao_colortip.c

Modified: addons/src/ao_colortip.c
8 lines changed, 8 insertions(+), 0 deletions(-)
===================================================================
@@ -71,6 +71,14 @@ static gint contains_color_value(gchar *string, gint position, gint maxdist)
 	guint length;
 
 	start = strchr(string, '#');
+	if (!start)
+	{
+		start = strstr(string, "0x");
+		if (start)
+		{
+			start += 1; 
+		}
+	}
 	if (start == NULL)
 	{
 		return color;



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list