From f8107019a396034a1ed783e3989bf663c03c788c Mon Sep 17 00:00:00 2001 From: Devyn Collier Johnson Date: Fri, 12 Jul 2019 23:37:32 -0500 Subject: [PATCH] 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). --- addons/src/ao_colortip.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/addons/src/ao_colortip.c b/addons/src/ao_colortip.c index f701d6003..d26cd3ecd 100644 --- a/addons/src/ao_colortip.c +++ b/addons/src/ao_colortip.c @@ -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;