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.

That does count as a text change and should trigger a fold gutter update. Can you verify what you’re seeing and if it is really happening show how to reproduce it?

My fault. I deleted my question.