Bug 1784 - Inconsistant when setting "Insert Matching Brace" with Hungarian language setting
Summary: Inconsistant when setting "Insert Matching Brace" with Hungarian language set...
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 2.8.1
Hardware: Macintosh Mac OS
: Low normal
Target Milestone: ---
Assignee: Mike Krüger
Depends on:
Reported: 2011-10-30 13:38 UTC by Chris Hardy [MSFT]
Modified: 2012-03-30 03:22 UTC (History)
2 users (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 Chris Hardy [MSFT] 2011-10-30 13:38:07 UTC
I figured out, that this option was never set in my preferences, so I switched it on-off. Does not solve the problem.However I was able to solve the problem by switching the feature on, quitting MonoDevelop, starting it again, switching it off, and restarting again.It seems that this feature is not initialized on migration, the default value and the default behavior does not match, and setting this feature is only read at startup time, and only saved on proper quitting (which mostly does not occur when logging out in Mac OSX)

After I switched on and off the feature as described in my previous mail it is working.

I'm using Hungarian localization.

What seems not working:
- Migration of this feature from previous version if there was no such feature (so the default state in the configuration displays as switched off, while it is really switched in).
- Instant use of the changed value.
- Saving the state of this feature if the application was not quited successfully.

I don't know, how to screencast these as these are not screen related features. I think I provided as much information as I could, as a programmer. Steps for repro are included below but for making easy to introduce it in bugzilla:

For the first:
1) Clean all MonoDevelop settings, remove MonoDevelop
2) Install a version of MonoDevelop for which the "Insert Matching Brace" feature is not presented.
3) Start MonoDevelop and then quit, to get settings saved.
4) Upgrade to a version of MonoDevelop which has "Insert Matching Brace" feature

Result: when typing code, braces are inserted, but in the preference menu, "Insert Matching Brace" feature is switched off.

Expected result: Either braces are inserted and "Insert Matching Brace" is switched in, <OR> braces are not inserted and "Insert Matching Brace" is switched off.

For the second:
1) Switch in "Insert Matching Brace" feature.
2) Restart MonoDevelop
3) Start typing code and observe that braces are inserted (which is expected).
4) Switch off "Insert Matching Brace" feature.

Result: By typing code, braces are still inserted.
Expected result: By switching off the feature and closing the preferences we expect that the feature is really turned off. (Additional note, after restarting MonoDevelop, this works as expected, the problem is that it does not start to work as expected when it is expected, only after the restart.)

For the third:
1) Change some settings in MonoDevelop
2) Modify a document.
3) Log out on Mac OSX without quitting MonoDevelop
4) Relogin and observe that the feature is not really saved

(This is because logging out mostly results in MonoDevelop crash, not application shutdown if there is document modified.) 

For consistency, I use Mac OSX Lion 10.7.2, (but these were also observed on Snow Leopard), with MonoDevelop version 2.8.1.

After my previous mail, I did not changed the feature settings, but sometimes it still switch on and inserts braces. For this I don't have any reproduction step - devs should investigate where in the code the feature is not correctly handled.
Comment 2 Mike Krüger 2012-03-30 03:22:19 UTC
Should be fixed in the 3.x (or 2.9.x alphas)
Some of the options were messed up, I removed the old option layer.