Perl Code Folding reads comment lines

This forum should be used for all code folding problems, questions or suggestions. You can also use this forum to request folding support for a new language.
Post Reply
Guest

Perl Code Folding reads comment lines

Post by Guest »

I've found that the folding seems to break if you have a } or a { in a comment line that's not "closed or open" in itself... i feel like thats a bug since the line is commented out
Guest

Post by Guest »

sample:

sub sample_fold{
#this is a commented {
if($something){print "else"}
}


folds to look like:

sub sample_fold{...

and the rest of the file is now blank (or folded really)
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

Thank you for posting this bug report.

The bug will be fixed and made available with the next Zeus patch. A new patch should be available within the next week or so.

Cheers Jussi
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

Below are links to a replacement xfolder.dll that fixes these folding issuse.

To install this patch, backup the current xfolder.dll file, download the correct patch based on your current version of Zeus and replace the xfolder.dll file the one contained in the zip:Jussi
Guest

Post by Guest »

this fix worked for me except with parens... the statement below messes up the folding:

if($#rs >14)



let me know if/when you can get a ptch for this...

thanks!
:)
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

Code: Select all

if($#rs >14) 
I assume the $ in the $# nullifies the comment character. Is that the case :?:

Jussi
Guest

Post by Guest »

yeah... i hadn't seen that before i started this job a week ago... it's basically the equivolent of calling scalar() on an array...

the next character can be almost anyting... $ [a-zA-Z0-9] so i'd prolly just have it look for $# if that feasible.

thanks
g
Guest

Post by Guest »

any luck getting a patch for this?
thanks
g
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

any luck getting a patch for this?

Using the latest Zeus release this Perl code folds correctly for me:

Code: Select all

if($#rs >14)  then {
}
The #rs does not color correctly, since the # is incorrectly detected as a line comment, but for me folding is working just fine :)

The comment painting bug is also on the Zeus todo list :)

But this fix does require a change to the generic Zeus syntax highlighting engine, meaning the change will effect all languages, not just Perl. This makes the bug a little more difficult to fix as it requires a good deal of thought, planning and testing to make sure the fix does not introduce any unwanted side effects :(

Cheers Jussi
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

The latest Zeus patch found here:

http://www.zeusedit.com/forum/viewtopic.php?t=570

fixes this Perl commenting issue ;)

Cheers Jussi
Post Reply