- Home /
Monodevelop 4.0.1 (Unity 4.3) code folding bug?
Just updated to Unity 4.3, which comes with MD 4.0.1. Every time I save (menu or ctrl+s) in MD, the code folding in MD breaks. In some cases it just thinks everything is one big block, in others it thinks everything apart from /// lines are not foldable. Anyone else getting this?
Yes, the moment I save a file all of the code expands and the code folding buttons disappear until any change is made to the file. Region folding is unaffected.
They did some modifications to how this works. $$anonymous$$aybe they introduced a new bug. "$$anonymous$$onoDevelop: Don't flush folding and undo data on document save."
Same problem here. And many others. I will do a forum topic today to resume them all. Then I will post the link here. I'm really not convinced that post $$anonymous$$ono problem here will give you a solution ;D
Answer by Lyje · Nov 16, 2013 at 09:29 PM
A temporary workaround: having saved a file, switch to another open tab in MonoDevelop, switch back to the tab of the file you just saved, wait a second and it should recalculate all the folding buttons.
In the other hand, if I open my scripts trough mono solution sidebar, I can't click on other tabs to switch viewing of previous opened scripts. Anyone got that same problem?
Answer by Vectorizing · Nov 20, 2013 at 11:28 PM
Another thing I noticed is every time I save the cursor jumps to line 1. This could get annoying for someone who is thousands of lines in code.
The problem of the cursor jumping to line 1 occurs when you have multiple instances of the same file open. Close the duplicates, and that should stop happening.
Answer by RMGK · Nov 20, 2013 at 10:00 PM
So I have reverted to using the old mono develop. Just do a duel install of Unity (Install Unity 4.2, rename its folder to something like "Unity 4.2", then install Unity 4.3) and then set your script editor in the Unity preferences window to the old mono. Life is a lot happier now :)
Answer by rkstormer · Nov 26, 2013 at 02:08 AM
I simply disabled code folding since I don't really care about it that much. It solved the problem of the cursor jumping to line 1 also.
In Mono Develop, go to the "Tools" menu, select "Options...", find the "text editor" section, select "general", then uncheck all three of the code folding options.
The problem of the cursor jumping to line 1 occurs when you have multiple instances of the same file open. Close the duplicates, and that should stop happening.
Dude I have been working so long without folding cause I did not find this option. THAN$$anonymous$$ YOU!
this code unfolding each time I save is seriously annoying, hope they fix that soon...
Answer by dsinghIITp · Mar 16, 2014 at 06:45 AM
If you do need code-folding, I would recommend using
#region regionname //(or simply give function name)
void function(){
...
}
#endregion
This solves the problem of unfolding while saving.
Your answer
Follow this Question
Related Questions
Why is Unity 4.3 so unstable? 0 Answers
Monodevelop not opening in Unity 4.3 16 Answers
How do I fix the duplicate files problem in MonoDevelop? 1 Answer
Why do placing a preprocessor directive inside another causes my script to lose proper indentation? 1 Answer
How to get the version of monodevelop from unity4.2.2 on unity 4.3 2 Answers