Bug 5177 - MonoDevelop gets formatting very confused in some cases
Summary: MonoDevelop gets formatting very confused in some cases
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 3.0.x
Hardware: PC Mac OS
: High normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2012-05-18 13:56 UTC by Aaron Bockover
Modified: 2012-05-21 07:19 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Screencast showing both bad behaviors. (1.62 MB, video/mp4)
2012-05-18 13:56 UTC, Aaron Bockover
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Aaron Bockover 2012-05-18 13:56:44 UTC
Created attachment 1919 [details]
Screencast showing both bad behaviors.

Attached is a screencast, but essentially MonoDevelop's format-as-you type (which seems to run when a statement/block is completed) tends to do some really strange testing of if/else conditions.

What is really bad is that you cannot undo the formatting without undoing what caused the formatting to execute.

In Visual Studio, if you are not happy with the way it auto-formats something, you can simply undo and move on - what you actually typed to trigger the formatting remains as you typed it.

MonoDevelop needs to perform formatting as a separate undoable step, not grouped with the step that triggers formatting.
Comment 1 Mikayla Hutchinson [MSFT] 2012-05-18 14:22:44 UTC
FWIW, we already fixed two related bugs:
https://bugzilla.xamarin.com/show_bug.cgi?id=4837
https://bugzilla.xamarin.com/show_bug.cgi?id=4836

We should probably backport them. Leaving this bug open for the actual formatting issue, anyway.
Comment 2 Mike Krüger 2012-05-21 07:19:12 UTC
Works in current 3.0 branch & master.

The undo works in master, but I'm not sure what a backport of that could cause for side effects - that's surely not safe to backport.