Re: Bug in gtksourceview's handling of #if 0
- From: Jeroen Zwartepoorte <jeroen xs4all nl>
- To: Gustavo Giráldez <gustavo giraldez gmx net>
- Cc: Michael Terry <mterry fastmail fm>, Gnome Devtools list <gnome-devtools gnome org>, Paolo Maggi <paolo maggi polito it>
- Subject: Re: Bug in gtksourceview's handling of #if 0
- Date: 12 May 2003 08:42:20 +0200
I definitely vote for keeping it in. I frequently use it to comment out
entire methods.
Just my 2 eurocents.
Jeroen
On Mon, 2003-05-12 at 06:33, Gustavo Giráldez wrote:
> Hi Michael,
>
> On Sun, 2003-05-11 at 16:35, Michael Terry wrote:
> > Hello. I was playing around with gtksourceview, and noticed that the
> > c.lang file has the cool feature of treating #if 0's as block comments.
> > However, it is a little broken, and may have to be taken out? (Unless
> > there is a sexy regexp way to fix it...)
> >
> > It stops coloring at the first #endif, instead of a matching #endif.
> > Thus, if you have
> >
> > #if 0
> > #if 1
> > #endif
> > #endif
> >
> > it will only color to the first #endif.
>
> That's right, it doesn't work as expected in that case. Unfortunately
> there's no possible solution using regular expressions and the current
> highlighting engine. We need a stack based engine for that to work
> correctly because the nesting depth is arbitrary. Redesigning the
> engine this way is on the TODO list, but it will not happen in the near
> future. Maybe for Gnome 2.6... who knows :-)
>
> I'm not sure about removing the pattern from c.lang though. It's nice
> ting to have when it works. Paolo, what do you think?
>
> Greetings,
> Gustavo
>
> >
> > -mt
>
> _______________________________________________
> gnome-devtools mailing list
> gnome-devtools gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-devtools
--
Jeroen Zwartepoorte <jeroen xs4all nl>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]