[Geany-Devel] Plugin development questions

Steven Blatnick steve8track at xxxxx
Mon Oct 7 14:59:01 UTC 2013

Not sure if this will help you, but I wrote a plugin to highlight 
anything selected and a search string using separate highlighting from 
the other searches and AddOn plugin.  It sounds like you are putting 
markers in the margin, but this code may be useful to look at if you 
wanted to mark the changes inline (such as using green to indicate added 
code).  You'll notice the gints I use for the indicators must be unused 
by geany for other highlighting.

Github - Quicksearch 



On 10/07/2013 06:54 AM, v01d wrote:
> Hi,
> thanks for the response.
>     Yes, since each editor have a separate marker handling (since it's a
>     separate ScintillaObject), you have to re-define the markers for each
>     document.
> Ok, great. Then I programmed it correctly =)
>     I'm not quite sure right now without any testing, but couldn't you end
>     up with a fractional value that gets wrongly rounded or something?
>     Sorry, I'm not so familiar with markers.
> It is possible, I will look into cropping the image on run-time somehow.
>     BTW, couldn't you use one of the builtin markers instead of an image?
>     Like a green SC_MARK_PLUS and a yellow SC_MARK_FULLRECT or something?
>     If this is ok for you it would save you from having to bother image
>     definition, loading, scaling, whatever.
> I would be glad to use Scintilla's symbols but I have two problems:
> a) I have only plus or minus (which makes sense) but couldn't decide 
> which was a good symbol for modified lines. This is a matter of 
> aesthetics anyway. Currently I'm using simply a block of solid color 
> using for each (red, yellow and green). However...
> b) The tricky part is that there are no lines which are marked as 
> deleted because, well, there are gone. So the "deleted" marker should 
> actually go between lines. Netbeans puts an arrow-shaped marker 
> pointing in between lines. So I emulated this as you can see in the 
> attachment, but it doesn't look really pretty and has these issues. 
> Since Scintilla only lets me add markers to lines (and not in between) 
> I resorted into creating a fourth type of marker named 
> "deleted-modified", which is used whenever the current line is 
> modified and previous lines were deleted (see picture).
> I will use these for now (unless someone suggests a simpler/better 
> solution) and continue into git integration.
> Best,
> Matías
>     Regards,
>     Colomban
>     _______________________________________________
>     Devel mailing list
>     Devel at lists.geany.org <mailto:Devel at lists.geany.org>
>     https://lists.geany.org/cgi-bin/mailman/listinfo/devel
> _______________________________________________
> Devel mailing list
> Devel at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/devel/attachments/20131007/b176a856/attachment-0001.html>

More information about the Devel mailing list