BUG: code folding in editor

I think there is a known bug with CASE statements causing the folder to become too greedy. If you remove the CASE, it works OK. See startfold-endfold problem