[Geany-Devel] Plugin development questions

v01d phreakuencies at xxxxx
Mon Oct 7 10:27:35 UTC 2013


Hi,
I'm writing a simple plugin for geany (which I will call LiveDiff) which
allows for having
indicators inside the editor for changed/added/modified lines, which is
updated as you type. The base for comparing
the buffer can be either the version of the file on disk or (which I will
soon attempt to add) the latest version from the git repository, if the
file is versioned so.
This resembles what netbeans does (one something I really liked). So far it
works OK but there are some quirks.
I'm doing this out of spare time so dont expect a pretty serious
commitement to it. I will however make it available on github.

I wanted to ask regarding the ScitillaObject handling. Currently my plugin
needs to define RGBA markers (which are used to indicate the diff results
per-line).
What it is not really clear to me is that there appears to be one
ScintillaObject associated with each GeanyDocument. However, some messages
sent to the ScintillaObject (like changing the margin or defining markers)
appear to be global across all instances (unless I'm mistaken). Is this so?
What would be the proper handling? Is it ok to repeat the definition of the
markers for each editor?

Moreover, I'm not sure how to handle correctly the size of the RGBA markers
since it depends on the font size of the editor. I tried to set the marker
scale using the text_height to image height ratio, but the marker still
appears to be a bit taller than the line and this creates some visual
artifacts.

Best,
Matias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/devel/attachments/20131007/f68df3d8/attachment.html>


More information about the Devel mailing list