Closed ghost closed 5 years ago
I've just tried to replicate this a few times, but I haven't been able to do it.
Any chance you can create a small scenario where you see this happening?
i have made folds on master branch. I start to work on the new feature so I branch of the master branch. I work on the same file (keeping previous folds). Once the feature is finished I push all changes. Then I switch back to master, merge the feature branch and all folds are gone.
If you need any more details I do not mind creating a little screen-recording
We've made some changes (today) to the internals of AutoFoldCode since you've created your issue. In order to maintain code folds across file saves and also hot exits, we've opted for an approach that saves the hash of the file and this is used to match the folds to each file.
That notwithstanding, any earlier versions would also not have worked for your use case. 😞
Unfortunately, since you're merging your files their content changes, and so it's impossible for AutoFoldCode to know if the regions it has saved for each code fold are still valid. Since any changes to the file will most likely invalidate the folds.
I'm afraid that as far as I can tell there's no viable way to solve your problem.
that is fair enough, thanks for considering anyway
Package works great, but I have noticed that when the using source control like git folds are lost after merging branches. Do you think it's something that could be developed to prevent this scenario?