"Collapse All" (Alt+O) not working... [when section preceded by four dashes]

Folding won't work if section is preceded by another line of at least four dashes. Is this a bug or feature? I often add lines of dashes before large sections when I have very long scripts for readability, but then we lose this precious folding feature.

Here's a minimal reproducible example:

# Section 1 ####
# This will collapse with Alt+O

#####
# Section 2 ####
# This will not collapse with Alt+O

Thanks for the bug report! Would you mind filing this as a bug report at https://github.com/rstudio/rstudio/issues?

Done here! Sorry that I didn't post this at the right place at first!

No worries! We generally welcome bug reports in the community forums first, since on occasion we can more easily triage before promoting the report to our GitHub issue tracker.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.