[Geany] Code folding doesn't work right.

Daniel Carrera dcarrera at xxxxx
Wed Aug 4 13:33:16 UTC 2010


Hi Lex,

On Wed, Aug 4, 2010 at 3:11 PM, Lex Trotman <elextr at gmail.com> wrote:
> let me try an example, of a simple piece of Perl, with the folds shown
> as best I can in plain text
>
> +-  if( $a<10 ){
> |        print $i
> --  }
>
> +- sub aaa {
> |      return 1
> -- }
>
> Then you fold up the sub aaa.
>
> Now deciding to add some text to the print type a quote on that line,
> the sub stays rolled up but notice that it changes colour to indicate
> its part of the string and the fold indicators disappear, as they
> should, it is parsed as part of a string.  So there is no fold point
> here to store the information that this is folded.

On my computer it doesn't stay rolled up. But no matter - we agree
that in the end the sub is unfolded.


> And folds in PHP and Ruby behave the same as Perl, they unfold, in
> fact using the same scenario as above they unfold immediately you type
> the opening quote, the others I don't know enough to test.

So that's 4 to 6 languages that have this problem.

> Geany doesn't actually control the parsing, its done by Scintilla the
> editing component it uses.  So Geany doesn't actually know that there
> is an unclosed string in the file, and so wouldn't be able to use this
> approach as far as I can see.

Not much chance of it getting fixed then?

Daniel.
-- 
Intolerant people should be shot.



More information about the Users mailing list