trigger foldService manually

Hi, our folding logic depends on some state outside of CodeMirror. For that reason sometime when the external state change the fold marker won’t show up properly unless user makes an additional dummy change to the text. Is there a way to trigger the foldService conditioned on some external state?
Thanks.

There currently isn’t, but with the patch below you can dispatch a transaction with some annotation on it, and detect that in the function you pass as foldingChanged option.

1 Like

Thank will try it out.