Describe the bug
When the "Inverse fold behavior" option is enabled in the Folding Settings, creating a new code block by typing ```` (backticks) causes the newly created block to immediately fold. This behavior is unexpected and disruptive to the workflow.
To Reproduce
Steps to reproduce the behavior:
- Go to Settings > Code Styler > Folding Settings.
- Enable the "Inverse fold behavior" option.
- In a note, start a new code block by typing ````.
- Observe the new code block is created and instantly folded.
Expected behavior
The new code block should be created in an unfolded state, allowing the user to continue typing without interruption. The "Inverse fold behavior" option should only affect the initial state of existing code blocks when a note is opened, or should be explicitly triggered, not activate upon creation.
Actual behavior
Upon creation, the new code block is automatically folded, and the text cursor is moved outside the code block. This forces the user to manually unfold the code block to begin writing code, disrupting the natural flow of typing.
Screenshots
(If applicable, add screenshots or a short screen recording to help explain your problem.)
Environment (please complete the following information):
- OS: [e.g., Windows 11, macOS 14.5]
- Obsidian Version: [e.g., 1.6.7]
- Code Styler Plugin Version: [e.g., 1.2.0]
- Theme: [e.g., Default, Minimal]
Describe the bug
When the "Inverse fold behavior" option is enabled in the Folding Settings, creating a new code block by typing ```` (backticks) causes the newly created block to immediately fold. This behavior is unexpected and disruptive to the workflow.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The new code block should be created in an unfolded state, allowing the user to continue typing without interruption. The "Inverse fold behavior" option should only affect the initial state of existing code blocks when a note is opened, or should be explicitly triggered, not activate upon creation.
Actual behavior
Upon creation, the new code block is automatically folded, and the text cursor is moved outside the code block. This forces the user to manually unfold the code block to begin writing code, disrupting the natural flow of typing.
Screenshots
(If applicable, add screenshots or a short screen recording to help explain your problem.)
Environment (please complete the following information):