Bug 670213

Summary: Document formatter deletes valid text!
Product: [Mono] MonoDevelop Reporter: K L <kobi2187>
Component: texteditorAssignee: Mike Krueger <mkrueger>
Status: RESOLVED DUPLICATE QA Contact: MD Bugs <monodevelop-bugs>
Severity: Critical    
Priority: P3 - Medium    
Version: SVN   
Target Milestone: ---   
Hardware: x86   
OS: Windows XP   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description K L 2011-02-08 08:58:01 UTC
User-Agent:       Opera/9.80 (Windows NT 5.1; U; en) Presto/2.7.62 Version/11.01

I have the document formatter run before saving (In text editor behaviour prefs)
sometimes it deletes my code. usually arguments to a function,
but now I also noticed it deleted the namespace.

I suspect some calculation is off, but I noticed the same place gets chopped off.

Ofcourse it is very annoying and unacceptable.
I like monodevelop so I hope it gets fixed promptly.

please contact me for debugging the problem with you.

- another misbehaviour that I see with the document formatter is this case:
void dosomething (int x, object o) // this statement does something...
{
do something
}

the code formatter takes the opening brace and adds it AFTER the comment on the first line.

Reproducible: Sometimes

Steps to Reproduce:
1.
2.
3.
Comment 1 Mike Krueger 2011-02-08 09:54:47 UTC
I need the cases (files) where that happen.
I fixed the opening brace + comment bug - that was a case I could easily reproduce.
Comment 2 Mike Krueger 2011-02-17 10:08:55 UTC
I think it's the same issue than in the other bug report.

*** This bug has been marked as a duplicate of bug 672154 ***