[Geany-devel] [PATCH] Better-looking comments indenting

Nick Treleaven nick.treleaven at xxxxx
Fri Sep 24 11:51:29 UTC 2010


On Fri, 24 Sep 2010 00:15:49 +0300
Liviu Andronic <landronimirc at gmail.com> wrote:

> On Wed, Sep 8, 2010 at 6:25 PM, Nick Treleaven
> <nick.treleaven at btinternet.com> wrote:
> > I've just realized, for the tabs & spaces mode this would be completely
> > broken as 8 spaces are compressed into tabs, e.g. when one line starts
> > with 4 spaces and the next line starts with a tab.
> >
> > So it seems the patch implementation is a no-go.
> >
> This is unfortunate. Current 'toggle comment' tends to make the code
> less readable.

The implementation needs tweaking. Maybe it could revert to the old
behaviour if a mixture of tabs and spaces are found.

Also it should ignore empty lines with no indentation, as these lines
may have been stripped. Those lines make the patch ignore indentation
when commenting.

Finally, the pre-patched comment function was too long. Ideally any new
behaviour would make use of helper functions.

Regards,
Nick



More information about the Devel mailing list