[Geany-Devel] patch: emphasize matches with search results in message window

Vinz C. vinzc at xxxxx
Mon Sep 10 14:23:34 UTC 2018


Hi Geany developers.

First off, I've been using Geany for years now. I just love it. Thanks
for making it <3.

I'm a newcomer (you probably noticed). I have a patch for Geany to
submit to you.
As I regularly use the search window and the results to locate matches,
I wished
the results highlighted matches. I couldn't find how to change the font
(bold or italic)
so I went for something simpler.

This patch surrounds matches in each result line with right/left
pointing thumbs. I have
to admit this is really good enough to me as, with time, I started to
squint to find where
in the results the search pattern lies. I hope you find it useful. I've
already applied and
tested it with the version of Geany installed on my machine (Gentoo) —
FYI Gentoo
provides out-of-the-tree patching features without resorting to overlays.

Note however I didn't go as far as detecting regular expression
sub-matches. Only the
text delimited by the "start" and "end" fields of the "GeanyMatchInfo"
structure are
taken into account — which was sufficient to cover all the cases I need.
IMHO adding
more symbols is likely to clutter the result lines more than necessary.

Here's what a search line looks like ("gint" is the search pattern):

    sciwrappers.c:207: return (☛gint☚) SSM(sci, SCI_GETEOLMODE, 0, 0);

FTR I have selected filled thumbs instead of the empty ones (U+261E,
U+261C) for
maximum contrast.

Greetings,
Vince C.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-search.c-Highlight-searches.patch
Type: text/x-patch
Size: 1940 bytes
Desc: not available
URL: <https://lists.geany.org/pipermail/devel/attachments/20180910/0462a1b3/attachment.bin>


More information about the Devel mailing list