Skip to content

cache fold levels #3049

@Konfekt

Description

@Konfekt

To follow up on #2427 (comment) :

Yes, it will once, but then it just spits out the precomputed fold level for each line till the next change.
Whereas I am under the impression that as Vim implements &foldmethod=expr the function is called for every line and then each such has to redo the computation.
In contrast, this recomputation is only done once, how knows for which line (likely the first), and then stored and retrieved in all subsequent function calls (for higher line numbers).

This might be too apparent an idea, but somehow I never see this caching

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions