On Sat, 29 Aug 2009 12:05:35 +0200 Enrico Tröger <[email protected]> wrote:
> 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. I think this would be very helpful for all of the plugin programmes. At least I could make some usage of it ;) Thanks, Frank -- Frank Lanitz <[email protected]>
pgpk52sxmYdrj.pgp
Description: PGP signature
_______________________________________________ Geany mailing list [email protected] http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
