-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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
Autocomplete is inserting selection after typing period #70176
Comments
What you described is the expected behavior of commit characters: they accept the currently showing suggestion. We treat I can't reproduce |
Looks similar to #66868 There are multiple reports, and I can also reproduce it with latest insiders build. Yes, you have to type very fast, or make your computer run slower may help reproduce. |
It's also very funny that different type speed will give me different suggestions. When I type "T H" very fast, it gives me But when I type slowly, it gives me |
So you want I think @yume-chan is on the right track: when typing fast it happens, otherwise it doesn't. |
I hate this behaviour. I have added It just feels so unnatural otherwise. If I want something to auto-complete I will press tab, otherwise it should never auto-complete. I don't understand why this isn't the default behaviour. |
I'm getting this as well. It's maddening --- I keep getting spurious and incorrect insertion of text. I've seen it happen on commas, spaces and various other bits of punctuation, too. I know that some people like it, but I would really like a way to disable it completely (except for tab, of course). |
Just had it again: typing at speed and hit |
@cawoodm I don't think it's a speed bug. If you type It does in my build, I just tested it. I'm using VS Code 1.31.1 @yume-chan I believe your observation is not related to this issue. This issue relates to accepting autocomplete suggestions and how annoying it is that period and also bracket are treated as "commit characters". The behaviour you describe is related to the population/generation of the autocomplete suggestions and not the accepting of the suggestion. |
@davidgiven You can disable it (except for tab, of course :P). Open your settings.json and add I am still confused why this isn't the default setting though. Or why there are "commit characters" other than tab. |
@mjbvz This drives me mad 😆 . I do test-driven development and the majority of the time I am writing the code as I expect it to be used before actually implementing it. So period and parentheses as commit characters always ends up producing an incorrect autocomplete. It's very annoying to have to press ESC every time I dot into something or call a method that autocomplete hasn't found (because it doesn't exist yet). |
I think we have to say that So if I type If I type I think by only autocompleting actual members instead of top level objects we would be rid of this bug. Does anyone seriously want |
Been getting this consistently in a React class-based component where you starting typing Another similar issue that was closed prematurely is #56026 |
+1 to the issue. experiencing it all the time. very annoying. |
@ivanvoznyakovsky and @prurph please add your thumbs up to the issue description. |
I've noticed for a while now that, occasionally, when I type I just updated to the latest release and created a new test file. In the new file, I could not type That this is the default behaviour is absolute madness. |
I keep experiencing aggressive autocomplete suggestions in JavaScript environments when trying to type three dots for, say, spreading or rest props. The autocomplete has always been excellent, but a recent change must have introduced some kind of regression. It only happens sometimes, and it often occurs in situations where it doesn't make sense. For instance, if I try to type: const { ...rest } = something; it would end up becoming: const { .children once I type the second Actual screenshot from VSCode showing the bug (this one occurred on the third period): For now, I've disabled this setting by disabling |
I captured a gif of me typing in a python environment EDIT: a blank javascript or python buffer does not appear to exhibit this behavior. Autocomplete in a small file does not seem to behave this way either. It sometimes happen that there is a lag between the typing of the dot |
@Hiestaa Please file that issue against the python extension |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
I think this bug should remain open, as it is still affecting multiple users. |
Justification
This is a duplicate of #47696 which IMHO was closed prematurely. There seems to be confusion between a hotkey which launches intellisense (like
.
) and a hotkey which confirms the intellisense suggestion (like<tab>
or<enter>
. Normally, when one types.
one expects suggestions but does NOT want the first suggestion to be accepted. If I typewindow.
I do not wantwindow.location
becauselocation
is at the top of the list..
is not, a "commit character" as mjbvz says - rather it should offer suggestions but not choose them.If we're agreed on that then there does seem to be a bug:
dp(
I getdevicePixelRatio
inserted which is not what I want.steps
I getSVGTextPositioningElement
.I can't reproduce it always but it happens sometimes and seems to be design according to #47696. That cannot be right.
Original Bug Report
Autocomplete is inserting the selected suggestion after the user types a period. This is not mentioned in the User Guide, which says Pressing Tab or Enter will insert the selected member., and there appears to me to be no clear way to disable this via the keymap. I suspect this is a behavior that some users may expect, but it would be nice if there was some way to disable it, as it makes for a frustrating experience to type out property names that Intellisense is not suggesting.
Steps to Reproduce:
Create a Javascript file test.js
The text was updated successfully, but these errors were encountered: