Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completion completes too much #4515

Closed
0x53A opened this issue Mar 14, 2018 · 4 comments
Closed

Completion completes too much #4515

0x53A opened this issue Mar 14, 2018 · 4 comments
Labels
Area-LangService-API Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone

Comments

@0x53A
Copy link
Contributor

0x53A commented Mar 14, 2018

  1. Area51ProviderX is the correct name

image

  1. Now I press CTRL+Space with the cursor at the end:

image

image

@cartermp
Copy link
Contributor

@0x53A is there a link to the project you can give?

@dsyme dsyme added the Bug label Mar 14, 2018
@0x53A
Copy link
Contributor Author

0x53A commented Mar 14, 2018

namespace ProviderImplementation

//[<TypeProvider>]
type Area51ProviderX () = class end


namespace Area51
type XX = ProviderImplementation.Area51Provider

set the cursor at the end of the last line, press CTRL+SPACE

@cartermp
Copy link
Contributor

cartermp commented Mar 14, 2018

Seems like something gets thrown off when there's a numeric character:

module M =
    let foo12Bar = 12

M.foo12Ba <<-- caret here

ctrl+Space on the end there will result in M.foo12foo12Bar.

What's happening is that the span in item.Span below corresponds to whatever comes after the numeric char(s). Then it replaces just that span:

https://github.com/Microsoft/visualfsharp/blob/ff61ee5e69d9efa9bb278b75c5e319c6989f864c/vsintegration/src/FSharp.Editor/Completion/CompletionProvider.fs#L279

So the item being passed into GetChangeAsync has the wrong span.

@cartermp cartermp added this to the 16.0 milestone Aug 29, 2018
@cartermp cartermp modified the milestones: 16.0, 16.1 Feb 21, 2019
@cartermp cartermp modified the milestones: 16.1, 16.2 Apr 23, 2019
@cartermp cartermp modified the milestones: 16.2, Backlog Apr 30, 2019
@dsyme dsyme added the Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code. label Aug 26, 2020
@cartermp
Copy link
Contributor

This should be addressed by #10500

@cartermp cartermp modified the milestones: Backlog, 16.9 Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-LangService-API Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Projects
None yet
Development

No branches or pull requests

3 participants