[Geany-devel] Markers

Lex Trotman elextr at xxxxx
Sun Mar 11 01:33:07 UTC 2012

On 11 March 2012 03:42, Dimitar Zhekov <dimitar.zhekov at gmail.com> wrote:
> On Sat, 10 Mar 2012 17:43:16 +0400
> Alexander Petukhov <devel at apetukhov.ru> wrote:
>> > utils_ui_get_marker(), utils_ui_free_marker().
>> >
>> Is it going with these new functions?
> Nothing is going on, the thread died.
>> I started with SF bug about markers and also came up to that having
>> such functions would be the best way for dealing with plugin's markers.
> Fellow developers, how about implementing these?
> I can do it, they are not hard to write.

Hi Dimitar,

Sorry not to reply sooner, very busy.  Offer gratefully received.

I don't think much is needed:

1. Scintilla already provides the special symbol SC_MARK_AVAILABLE to
indicate that the mark is available.

2. As I read the Scintilla docs, it isn't the default, so Geany needs
to initialise all markers it doesn't use to SC_MARK_AVAILABLE each
scintilla object it creates.

3. When a plugin needs a marker for a document it should search for
one that is available on that document and use that, and set it back
to available when it no longer needs it and on unload.  There are only
32 to search so it isn't IMHO worth implementing anything faster.

4. As noted previously in the thread, since plugins know if they can
work without the marker it should be left up to the plugin to provide
a user error message if no markers are available.

So all we need is the initialisation, and probably a common search
routine for the convenience of plugins (although that isn't absolutely
needed).  The smaller the patch the more likely someone has time to
test it and commit it.


> --
> E-gards: Jimmy
> _______________________________________________
> Geany-devel mailing list
> Geany-devel at uvena.de
> https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

More information about the Devel mailing list