Re: GtkSourceView: newbie questions

Albrecht Dreß <[email protected]>
Newsgroups gmane.comp.gnome.devtools
Message-ID <[email protected]>
Hi Paolo:

First, thanks a lot for your quick response!

Am 04.01.06 20:30 schrieb(en) Paolo Maggi:
> > (1) I use gtk_pattern_tag_new() with the pattern
> > (^|[[:space:]])_[[:alnum:]]([^_]|\n)*[[:alnum:]]_
[snip]
> I think the problem is due to the fact you use [:alnum:].
> I think you should try to match all characters except _

Hmm, that's not exactly what I want - [^_] would also match all other  
unicode chars for which g_unichar_isalnum() is not TRUE (see [1]).  
Building a proper unicode class seems to be like pulling a whale on the  
beach...

> > the regex engine. Would it be possible to add multiline matching
> > through the api?
> 
> Multiline matching is not supported. In this case you could try to match
> two different regex: "_[^_]*($|_)"  and "^[^_]*_".
> This clearly does not work if the underlined text spans 3 or more lines.

Hmm, I see. Anyway, multiline matching would simplify life a lot, so if  
you ever consider to introduce it... ;-) Of course, this is nonsense if  
you limit GtkSourceView's matching to programming languages, but  
human-readable stuff (like my case) may have different requirements (also  
the point above).

> No idea. It may be a repainting problem. Please, file a bug in bugzilla.

Might also be a problem that balsa launches a g_timeout to re-wrap the  
buffer (which under some circumstances makes the application crash), I'll  
investigate that.

> > foreground colour *and* the word in the red box is bold?
> 
> This is not possible. It will be possible in the future.

Cool, I'll look forward to that!

Cheers, Albrecht.


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Albrecht Dreß  -  Johanna-Kirchner-Straße 13  -  D-53123 Bonn (Germany)
        Phone (+49) 228 6199571  -  mailto:[email protected]
   GnuPG public key:  http://www.mynetcologne.de/~nc-dreszal/pubkey.asc
_________________________________________________________________________

_______________________________________________
gnome-devtools mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-devtools
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBDvDDHn/9unNAn/9ERAoHgAJ0Y6noEosn2z+iy/IyR/h5o53dBcgCfdvTs
RgPWNT9pCXgief3KJY75rhI=
=lpm1
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.