Skip to content

Conversation

@Traben-0
Copy link
Contributor

Description

preprocessor comment blocks can now fold each if/ifdef/elseif/else block separately, rather than the entire block from #if -> #endif

specifically #if now not only folds to #endif but also to the end of the line before any #else or #elseif which then starts a new fold from the #else or #elseif, which behaves the same way

this makes folding far more usable with nested/complex preprocessor comment blocks, and also sets things up for a possible "collapse inactive blocks by default" option which i want to try add eventually

How to test

vid example \/

Recording.2025-09-27.065402.mp4

Release Notes

- preprocessor comment blocks can now fold each if/ifdef/elseif/else block separately, rather than the entire block from #if -> #endif

@Traben-0
Copy link
Contributor Author

note this implementation doesn't track the ordering of the else and elseif blocks, and folds them in any order.
image
but the warning highlight about that remains visible when folded so i dont think thats a concern here

@Wyvest Wyvest merged commit cac3db1 into Polyfrost:main Sep 26, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants