Bug 3381 - Auto-complete for case labels breaks if you type full value
Summary: Auto-complete for case labels breaks if you type full value
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 2.9.x
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Mike Krüger
Depends on:
Reported: 2012-02-10 13:20 UTC by Jeffrey Stedfast
Modified: 2012-02-13 07:27 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 Jeffrey Stedfast 2012-02-10 13:20:33 UTC
If you type a case label (of some enum type, for example) but don't use the completion and instead type the entire value by hand, things break.

For example:

public enum MenuOptions {

and then later in the code, have:

switch (option) {

And in that switch statement, type "case MenuOption.Pause:"

what you get is: "caMenuOption.Pauseause:"

I guess when I hit the ':', it selects the MenuOption.Pause completion in the completion window and tries to insert it, but inserts it at the wrong text offset (off by a few characters).
Comment 1 Mike Krüger 2012-02-13 03:56:31 UTC
Ouch, that was a very complicated event chain bug - but I found a 1-liner fix for that ^^

Comment 2 Jeffrey Stedfast 2012-02-13 07:27:54 UTC
thanks Mike!