[Geany] Code folding doesn't work right.

Lex Trotman elextr at xxxxx
Wed Aug 4 09:28:46 UTC 2010


On 4 August 2010 17:37, Daniel Carrera <dcarrera at gmail.com> wrote:
> On Wed, Aug 4, 2010 at 2:53 AM, Lex Trotman <elextr at gmail.com> wrote:
>> Can you please provide more information to help repeat the bug, It
>> doesn't happen for me.  Version of Geany, which language are you
>> editing and steps to a repeatable example would be good.
>
> Geany version 0.18 running on Ubuntu 10.04 Lucid, language is Perl.
>
> I *JUST* figured out how to reproduce the problem. Up until 5 minutes
> ago it looked random, but after additional testing, I found the cause:
>
>
> 1. Write a bunch of functions and fold them.
> 2. Somewhere above those functions, type a quotation mark:  "
>
>
> You know that when you first type a quotation mark, the highlighting
> is wrong until you close the quotation mark. Geany interprets that the
> rest of the file is in quotes. The *PROBLEM* is that when this
> happens, Geany decides to unfold everything, and when you close the
> quote, Geany doesn't fold them back.

Ok, thats because they are NEW fold points, the old ones you had
rolled up were removed when you turned the whole file into a string.

New fold points are always open otherwise as you typed the program it
would fold up on you

This isn't a problem with other languages, except for Python triple
quotes, because AFAIK no other language embeds newlines in strings, so
the extent of an opened string is limited to one line and the fold
points don't disappear since they are on other lines.


 In other words, Geany ruins my
> folding every time I type a quoted string. :-(
>
> I know about the auto-close-quote feature. I don't like it. I had it
> for a while and I decided it was more annoying than useful. For
> example, if I want to put quotes around an existing text, the
> auto-quote feature actually gets in the way.

Shhh, I mostly agree with you about that, but thats just our opinion :-)

Sadly I don't see an easy fix for the problem, what do other editors
do?  Maybe we can steal their algorithm if it works better.

Cheers
Lex

>
> Daniel.
> --
> Intolerant people should be shot.
> _______________________________________________
> Geany mailing list
> Geany at uvena.de
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
>



More information about the Users mailing list