Bug 666380

Summary: "Reload from disk" loses code folding
Product: [Mono] MonoDevelop Reporter: IB Board <ibboard>
Component: texteditorAssignee: Mike Krueger <mkrueger>
Status: RESOLVED FIXED QA Contact: MD Bugs <monodevelop-bugs>
Severity: Minor    
Priority: P5 - None CC: nicolaj
Version: SVN   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 11.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description IB Board 2011-01-22 11:32:25 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.16 SUSE/10.0.633.0 (KHTML, like Gecko) Chrome/10.0.633.0 Safari/534.16

If I open a normal source code file then the text editor collapses nested sections and multi-line comment blocks. If the file is changed on disk while open (e.g. Git checkouts/reverts) and I click "reload" then all foldable areas are expanded.

Reproducible: Always

Steps to Reproduce:
1. Open a file with folded sections of code (e.g. heading comments)
2. Change the file externally (e.g. another text editor or a checkout/revert in VCS)
3. Click the "reload from disk" button
Actual Results:  
Code is fully expanded with no collapsed areas

Expected Results:  
Ideally, code folding is *exactly* as it was. However, given that the code may change substantially then default code folding would be sufficient.
Comment 1 Nicolaj Schweitz 2011-01-25 09:03:41 UTC
Also reproduces in 2.4.2 on OSX 10.6.6.
Same steps to reproduce.
Comment 2 Mike Krueger 2011-01-26 13:11:43 UTC
implemented.