Hello all, I've spotted what might be two problems with folding... They are demonstrated with the following line of Java code:
Image[] AnnimationPics; //{picture number,delay in 10ths of a second until changes to next image}
This line is marked as a folding point when it should not be.
Firstly: the curly braces ought to be ignored as they are in a comment (it is coloured by the lexer as a comment)
Secondly: even if it is not ignored there is a matching close brace for the open brace and so when you try to fold this line it should do nothing (instead it hides every line after this line, or crashes...)
I am assuming that this a problem with folding, or is it the lexer?
William
On 11/05/2010 01:30 PM, WILLIAM FRASER wrote:
Hello all, I've spotted what might be two problems with folding... They are demonstrated with the following line of Java code:
Image[] AnnimationPics; //{picture number,delay in 10ths of a second until changes to next image}
This line is marked as a folding point when it should not be.
This is a feature [1] in Scintilla (the text editor component used by Geany). See the fold.comment option in SciTE [2].
I'm not sure of the state of this feature in Geany (if it can be disabled without disabling the folding of multi-line comments as well) but Nick submitted a patch to the Scintilla mailing list in June [3]. And he made a change to Geany on the same day that "re-enables" comment folding [4].
[1] http://www.scintilla.org/SciTEDoc.html [2] http://sourceforge.net/tracker/index.php?func=detail&aid=2999043&gro... [3] http://groups.google.com/group/scintilla-interest/browse_thread/thread/61ee2... [4] http://www.geany.org/Documentation/ChangeLog
On 6 November 2010 07:30, WILLIAM FRASER william.fraser@virgin.net wrote:
Hello all, I've spotted what might be two problems with folding... They are demonstrated with the following line of Java code:
Image[] AnnimationPics; //{picture number,delay in 10ths of a second until changes to next image}
This line is marked as a folding point when it should not be.
Firstly: the curly braces ought to be ignored as they are in a comment (it is coloured by the lexer as a comment)
Secondly: even if it is not ignored there is a matching close brace for the open brace and so when you try to fold this line it should do nothing (instead it hides every line after this line, or crashes...)
I am assuming that this a problem with folding, or is it the lexer?
Folding is also determined by the Lexer, so its both :-)
I'm not sure why, but if it makes //{ and //} fold points but doesn't search any further in the comment so the } is ignored.
Cheers Lex
William
Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
On Fri, 5 Nov 2010 20:30:53 +0000 WILLIAM FRASER william.fraser@virgin.net wrote:
I've spotted what might be two problems with folding... They are demonstrated with the following line of Java code:
Image[] AnnimationPics; //{picture number,delay in 10ths of a second until changes to next image}
This line is marked as a folding point when it should not be.
This is fixed in current SVN.
Firstly: the curly braces ought to be ignored as they are in a comment (it is coloured by the lexer as a comment)
Secondly: even if it is not ignored there is a matching close brace for the open brace and so when you try to fold this line it should do nothing (instead it hides every line after this line, or crashes...)
I am assuming that this a problem with folding, or is it the lexer?
A crash would be a bug in the Scintilla lexer, but Geany's Scintilla is a bit old so it may have been fixed already.
Nick