Skip to content

Folding not triggering when carets in indentation of test block #5

Description

@G-Rath

Currently folding only happens when the caret is within the block that will be folded (i.e describe('<message>', it('<message>' and so on).

This means that if you have your caret on the intent of a block, folding won't be triggered.

See this gif for an example:

In particular, note where the caret is when the //#region tag folds, vs when folding takes place for the describe block.

fold-test-blocks-plugin-i5

Ideally we'd like to match the behaviour of other foldables as much as possible.


I suspect this behaviour actually might be a result of some "fold-up" logic, where IntelliJ looks for the next/closest element to fold when requested to fold, which for some reason our folds don't meet.

This folding happens with other foldables as well, such as class methods:

fold-test-blocks-plugin-i5-2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions