Bug 5213 - code completion should prefer identical casing
Summary: code completion should prefer identical casing
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 3.0.x
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2012-05-21 14:41 UTC by Jeffrey Stedfast
Modified: 2012-07-16 21:09 UTC (History)
2 users (show)

Tags:
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:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Jeffrey Stedfast 2012-05-21 14:41:51 UTC
If there are multiple matches in code completion that have the same string but different casings, the code completion window should really prefer the one that matches the casing that the user has typed.


For example, if I have a variable named 'type' and I type "typ", the code completion window defaults to "Type" instead of "type".

If I have a class property named "Settings" and a variable named "settings", code completion defaults to "Settings" instead of "settings" even though I've typed "settin"
Comment 1 Mike Krüger 2012-05-22 02:34:54 UTC
Works for me - I need the the exact case or even maybe a screencast.

It may be that it works on master but not on 3.0.
Comment 2 Jeffrey Stedfast 2012-05-22 10:06:36 UTC
yea, I was using the 3.0.1 release. I'll try to test with master later. We should make sure the fix is in 3.0-series HEAD as well.
Comment 3 Jeffrey Stedfast 2012-05-22 11:10:57 UTC
This appears to be working better in latest 3.0-series branch, so presumably also fixed in master.
Comment 6 vanzomerenc 2012-07-13 00:27:24 UTC
Still not fixed as of 3.0.2. I haven't tested it on 3.0.3, but there's no fix for it listed in the release notes.
Comment 7 vanzomerenc 2012-07-13 00:37:44 UTC
Actually, it seems to be happening the other way around. Creating any combination of two properties, fields, or variables with the only difference in name being the case of the first letter results in autocomplete always selecting the lowercase one.

Should I make a new report?
Comment 8 Mike Krüger 2012-07-13 01:51:45 UTC
it's working for me on master - 3.0.2 and 3.0 is mostly the same version. 3.0.3 is a step forward.
Comment 9 vanzomerenc 2012-07-13 14:20:19 UTC
I'm assuming "master" means the github master branch. I'm also assuming that any changes made to code completion in 3.0.x have not been brought back into the master branch.

I've tested this problem a bit more to see why it hasn't been replicated by anyone else. It's actually a lot more specific than I thought.

First, the potential completions must match --including case-- up to the last typed character. Only the first character has a different case.

So having the following:

int Abc;
int abc;

and activating autocomplete with "Abc" will result in "abc".
Anything past what's typed into autocomplete is not counted, so having fields Abc/abcde or Abcde/abcd still results in the same behavior.

If it were Abc/abC, ABC/abc, abc/abC, etc., this doesn't happen.

Second, if the first letter is repeated as a capital in the names, the lowercase option does not even show up when typing.

So:

int AbcA;
int abcA;

...and activating autocomplete with "Ab" will correctly show "AbcA" as the best match, but will not show "abcA" at all. If just "A" is typed, both are shown and it will proceed to choose the lowercase one.
Comment 10 vanzomerenc 2012-07-16 21:09:15 UTC
Okay yes, an update did fix it. Sorry for the trouble.