[Geany-Devel] Plugin development questions

v01d phreakuencies at xxxxx
Mon Oct 7 12:54:00 UTC 2013


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
> 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/fa58081e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: livediff.png
Type: image/png
Size: 5873 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20131007/fa58081e/attachment.png>


More information about the Devel mailing list