Bug 3503 - match braces
Summary: match braces
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 2.8.2
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Mike Krüger
Depends on:
Reported: 2012-02-16 15:09 UTC by skalev
Modified: 2012-04-05 05:20 UTC (History)
1 user (show)

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

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:

Description skalev 2012-02-16 15:09:55 UTC
Using MonoDevelop's "match braces" option, causes a weird behavior and delay.

I'll click "{" and get {|} (| = my cursor) - so far, expected.
I'll Hit ENTER and expect to get:

but instead i get:

very annoying. Thing is, if I wait for a second, and then hit ENTER,
I'll get the right result:

anyone knows how to fix this???
Comment 1 Mike Krüger 2012-02-17 02:08:14 UTC
Turn off on the fly code formatting.

Should work in newer releases btw.
Comment 2 skalev 2012-02-17 11:08:28 UTC
On the fly is off.

I'm using mono that came with unity, so i'm not sure if I can upgrade.
Comment 3 skalev 2012-02-17 14:05:21 UTC
Update - Just installed latest version.
Bug persists.
The timeout seems a bit shorter, but quickly pressing enter still causes the cursor to go down a line and leave the brace in the one above.
Comment 4 Mike Krüger 2012-02-20 04:10:05 UTC
Are you using spaces or tabs for indentation ?
Which line endings do you use (unix, windows, mac style)?
Comment 5 skalev 2012-02-20 11:36:52 UTC
Tabs, Windows
Comment 6 Mike Krüger 2012-04-05 05:20:21 UTC
Can't verify the behavior - I tried it several times on different OSes.

However much of the formatting infrastructure did change since the 2.8.x releases, therefore it may be that the bug was there and is fixed.

Are you holding the shift key while pressing enter ? If so that would be a reason for the behavior.