Code Folding is catching too many linesI have set "if" blocks to be foldable,
and I have been using them like this
If (1==1, // comment abc
);
If (1==1, // comment xyz
);
But often, the first block will catch later blocks and fold them all together.
The code work without a problem, but is is sometimes hard to find the code, it is lost in the folds.
Is there a solution to this issue?
ScriptingRe: Code Folding is catching too many linesI've tried to reproduce this behavior and I've not be able to.
What version of JMP are you using?
Can you provide an example of JSL that causes a problem?
Re: Code Folding is catching too many linesI have had same issue (with JMP15.2.1).
I managed to repeat it but I'm not sure how reliable this is:
1. Start with:
Expr(
if(
//example inside here IF
//example inside here IF
//example inside here IF
);
//example inside here EXPR
//example inside here EXPR
//example inside here EXPR
);
2. Remove ); from row 6:
Expr(
if(
//example inside here IF
//example inside here IF
//example inside here IF
//example inside here EXPR
//example inside here EXPR
//example inside here EXPR
);
3. Press enter on row 5 and add new if statement:
Expr(
if(
//example inside here IF
//example inside here IF
//example inside here IF
if(
);
//example inside here EXPR
//example inside here EXPR
//example inside here EXPR
);
4. Remove new If( but leave );
Expr(
if(
//example inside here IF
//example inside here IF
//example inside here IF
);
//example inside here EXPR
//example inside here EXPR
//example inside here EXPR
);
Images starting from part 3:
new if:

new if removed (something weird going on with code folding square):

afte re-opening script:

At least in this case seems like the code folding doesn't get properly updated if something is removed from the middle of code. For me it resolves usually by either rebooting JMP or just be closing and re-opening the script.