[Geany] Looking for plugin API calls...

Enrico Tröger enrico.troeger at xxxxx
Sat Aug 29 10:05:35 UTC 2009


On Thu, 27 Aug 2009 13:14:44 +0200, Joerg wrote:

Hey,

>In Germany we would say "I had tomatoes on my eyes".

Haha and it reads a bit strange in English, at least in German it
sounds better, I think :).


>(2) Can I get the some informations of the current line? It would be
>easier to know if a line is within a comment or not. Geany already
>knows this.

Yo.

Use sci_get_style_at() to get the style at a certain position in the
document like on the first or second column of the line you want to
examine.
The returned style is an integer referring to the one of the styles
defined in scintila/include/SciLexer.h (SCE_XXX_YYYY with XXX being
the lexer name) and is related to the used Scintilla lexer (which is
chosen by the used filetype in Geany).

In src/editor.c we have a helper function to check whether a certain
style value is a comment style for a certain lexer: is_comment_style().
Currently, this is a stati helper function, so you can't use it from a
plugin but we could add it to the public API if it helps. For the
meantime and testing, you might want to copy the code for now.

HTH,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20090829/64f3d1fc/attachment.pgp>


More information about the Users mailing list