[Geany] Patch - Indentation Preferences '}'

Bob Doan bdoan at xxxxx
Sun Nov 5 02:45:05 UTC 2006


Hymm.. Perhaps the bug is with auto indentation.

The problem w/ auto indentation right now(minus the patch) w/ c like
languages, is any time the '}' is used it tabs it over tab, so If I try
to insert a '}' at col 1, and tabs=4 the '}' gets inserted at col 5.  

This makes coding things really annoying.

At this point I think my patch doesn't really solve any coding style
problems, I think their is a bug in 

brace_match (sci_cb.c)

This code:

if ((pos > sci_get_end_styled(sci)) || (styAtPos == styBrace))

Is not always going to work, specifically the pos >
sci_get_end_styled(sci) when we are moving backwards.  It doesn't find
the matching '{' because of this, -1 gets returned and somehow an extra
tab gets inserted.

I don't see why we need function is needed at all, perhaps I'm missing
something.

I need some more clues here...

- Bob

On Sun, 2006-11-05 at 00:40 +0100, Enrico Tröger wrote:
> On Fri, 03 Nov 2006 18:13:11 -0500, Bob Doan <bdoan at sicom.com> wrote:
> 
> > Hi,
> >
> > Attached is a patch which adds a preferences for those who prefer
> > coding styles like:
> >
> > int foo() {
> >
> > }
> >
> > over
> >
> > int foo()
> > {
> >
> >
> > }
> >
> > Let me know if it is ok.
> The patch is nice but I don't see any advantage. Your option and the if
> in sci_cb.c is just a second "Use auto indentation". It doesn't change
> the behaviour when typing } in one of the above cases. It will be
> completely disabled or enabled.
> Or am I overseeing anything?
> 
> > Also, The uvena.de DNS does not always resolve from different ISP's in
> > the USA...
> Strange. I will have a look tomorrow.
> Can this host be related with one of your tries:
> 68-189-52-124.dhcp.rdng.ca.charter.com
> 
> Regards,
> Enrico
> 
> --
> Get my GPG key from http://www.uvena.de/pub.key
> _______________________________________________
> Geany mailing list
> Geany at uvena.de
> http://uvena.de/cgi-bin/mailman/listinfo/geany




More information about the Users mailing list