Incorrect autocomplete for a lambda variable.
Hi,
the autocomplete replaces tokens at a place where a lambda variable is expected, which rarely makes sense. For example, let's have
var values = new[]{ 1, 2 };
Then I start typing
values.Select(
at that point, I decide my lambda variable will be for example p. So I type p and a space, but LINQPad automatically changes p to params (the first match in the autocomplete list). Or it changes t to this and so on.
I didn't find an option to disable this. Would it be possible to fix it or make it configurable? I always use Tab or Enter to confirm the autocomplete selection, it would be great if it ignored Space.
Thank you.
Comments
Please also note that I typically press Space before the autocomplete result dialog shows up, but the symbol is still replaced.
Are you sure you don't have your Language set to C# Expression rather than C# Statements?
@sgmoore It behaves the same in all three query modes.
Can you provide a full repro please? I can't reproduce it with the following query, of type C# Statements:
When I press p after the opening parenthesis, nothing pops up.
Here it is: http://share.linqpad.net/7xt7os.linq
I also tried to record the screen, but the autocomplete pop-up dialog does not show up in the video.
Btw it is LINQPad 7.5.16 (x64), Premium Edition.
Do you have any extension methods in "My Extensions" or any DLLs in the plugins folder (Edit | Preferences > Folders)?
And if you have extension methods, do any of them define a Select method?
Good guess!
I have a "My Extensions" query, defining a Select method (though the type signature does not match). When I either rename it or disable "My Extensions" for the query, this behavior goes away.