Bug 11906 - Intellisense choice injects full name on edit of existing name.
Summary: Intellisense choice injects full name on edit of existing name.
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 4.0.4
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2013-04-23 11:27 UTC by Adam Patridge
Modified: 2013-05-03 04:31 UTC (History)
1 user (show)

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


Attachments
Demo of intellisense insertion bug. (856.91 KB, video/mp4)
2013-04-23 11:27 UTC, Adam Patridge
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 Adam Patridge 2013-04-23 11:27:23 UTC
Created attachment 3855 [details]
Demo of intellisense insertion bug.

Steps to reproduce:
1. Create an enum where some values contain an underscore character.
2. Create an instance of that enum with a value.
3. Edit that value by typing immediately after the underscore, triggering intellisense automatically.
4. Select an intellisense item and the full name is injected at the cursor rather than replacing the name being edited.

Example:
Editing `SomeEnum.Some_Value1` at the underscore and picking `SomeEnum.Some_Value2` from intellisense will result in `SomeEnum.Some_Some_Value2Value1`. See attached screen capture for demonstration.

Expected behavior:
Either replacing the full value (as in the steps below) or putting the full value in before the cursor. For exampled, if editing "SomeEnum.Some_Value1" at the underscore, selecting an intellisense item like "SomeEnum.Some_Value2" would result in either "SomeEnum.Some_Value2" (full replace) or "SomeEnum.Some_Value2Value1" (injected value up to cursor). I'm guessing the preferred choice would be a full replacement.

Steps that DO NOT reproduce:
1. Create an enum where values DO NOT contain an underscore character.
2. Create an instance of that enum with a value.
3. Edit that value. Intellisense isn't triggered automatically, bring it up manually.
4. Select an intellisense item and the name being edited is replaced completely with the selected item.

Since intellisense pops up automatically for one edit scenario but not the other, I suppose that could be its own bug.
Comment 1 Mike Krüger 2013-05-03 04:31:16 UTC
fixed