[Geany-devel] Markers

Lex Trotman elextr at xxxxx
Sun Mar 11 22:59:45 UTC 2012

On 12 March 2012 06:25, Dimitar Zhekov <dimitar.zhekov at gmail.com> wrote:
> On Sun, 11 Mar 2012 12:33:07 +1100
> Lex Trotman <elextr at gmail.com> wrote:
>> I don't think much is needed:
>> 1. Scintilla already provides the special symbol SC_MARK_AVAILABLE to
>> indicate that the mark is available.
> I already replied to this [1]. Unless we want each plugin to allocate
> it's markers for each document, possibly receiving different numbers,
> we should have a bitmap in Geany.
>> 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.
> Oh, I see. So any plugin with markers must keep track of each document
> it allocated markers in. This is not going to be fun.
>> why should
>> a C language plugin steal markers froma Python file when the Python
>> plugin also needs them??
> To be able to allocate markers #s in plugin_init(), and free them in
> plugin_cleanup(). To be able to work without tracking document file
> type changes.

Hi Dimitar,

Any plugin that is filetype specific must know which documents are its type.

I wouldn't expect (for example) GeanyLatex to interfere with my C#
programming.  Similarly I wouldn't expect the debugger plugin to try
to work on a language gdb doesn't understand, eg Java.

Maybe you should contact Matthew, during a conversation we had on IRC
he revealed a prototype for manageing all such limited resources, not
just markers, in a consistent manner.

Since the SC_MARK_AVAILABLE isn't, erm, available, for other recources
such as indicators, Matthew uses the suggested boolean map method.

@Frank, this would give a single consistent interface to acquire and
release all limited resources, markers, indicators, margins and


> [1]
> http://lists.uvena.de/pipermail/geany-devel/2012-February/006629.html
> --
> 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