[Geany-devel] Markers

Dimitar Zhekov dimitar.zhekov at xxxxx
Sun Feb 26 19:14:06 UTC 2012

On Sun, 26 Feb 2012 13:08:14 +0000
WILLIAM FRASER <william.fraser at virgin.net> wrote:

> There is a problem as I understand it with checking for the
> SC_MARK_AVAILABLE marker to see if a marker is available...
> Markers seem by default to be set to 0 (SC_MARK_CIRCLE) by scintilla.

"By default, all 32 markers are set to SC_MARK_CIRCLE with a black
foreground and a white background."

> 2) change scintilla or geany so that markers are set to SC_MARK_AVAILABLE
> when it is initialised.

"Applications may use the marker symbol SC_MARK_AVAILABLE to indicate
that plugins may allocate that marker number".

So AVAILABLE is specifically designed for our case, and it's Geany that
should be changed, not scintilla.

> Option 2 would be the most versatile in the long run, but would require
> altering someone else's project purely for our own devices, and it would
> require anyone using a plugin using markers to have to use the latest
> version of geany.

The old plugins may continue to use their fixed marker numbers, which
will show as "allocated" [1] . They won't "deallocate" the numbers on
_cleanup, but will "allocate" the same numbers if reloaded.

[1] Unless somebody uses a marker without defining it. White circle
with black background, anyone?..

> My personal preference would be some shared static function that any plugin
> using markers could access.

A simple ui_utils function to find and return the first available
marker based on SC_MARK_AVAILABLE would suffice.

E-gards: Jimmy

More information about the Devel mailing list