Sublime Forum

Folding not accurate

#1

After using the formatter such as Prettier, the folding become a mess.

I’m not sure if this problem is coming from Sublime Text or Prettier?

0 Likes

#2

Most likely caused by ST. I’ve stumbled about fold regions getting messed up or operations being done on wrong locations various times. It seems some operations are executed others not.

0 Likes

#3

Should I report this as a bug? I wonder why no people mentioned this in the past for such a long time

0 Likes

#4

Ideally with easy to reproduce steps.

There are already some folding related issues, but none of which about out of sync fold regions after editing.

What I stumbled about was most likely, folded regions still being taken into account when searching tokens, when doing alt+f3 for instance, but caret then being placed to folded regions’ boundaries, causing any subsequent multicursor edit orperation to create garbage.

0 Likes