-
Notifications
You must be signed in to change notification settings - Fork 27.8k
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
Have to press enter twice after typing out full completion #11944
Comments
This is how the suggest widget accept on enter behaves also in the editor. |
Disagree - the editor and the repl are different beasts and accepting inserting a new line whenever you auto complete doesn't make sense in the editor. I am pretty sure @isidorn is aligned on that. Either change the default for the repl or tell users to do so - the change should be trivial, just preprint |
@jrieken Thanks for the tip, but what exact key do you mean? I tried preprinting it to the currentWord but that did not work. |
Sorry, prepend to the command id, like we do it here in TypeScript which means. Bind |
Thanks @jrieken this works however as you said this makes the suggestion be accepted and the listeners triggered - which in my world means a new line is added on enter(editor reacted on the listener). I would need two of my actions to be exectued, suggestion accepted and repl input accepted and only in the special case that the input matches the whole selection. Not sure if this is possible. For comparison chrome dev tools always evalutes on enter and never acceppts the suggestion - I am also against that since it is much different behavior than our editor. Also the user can configure this via |
I wasn't trying to say what the repl should do. Surely this isn't a default for the normal text editor, for the repl maybe and iff not it the configuration users have to do |
Decided that this is less frustrating than #18751 |
fyi @jrieken this is the issue I was mentioning in the standup |
Assigning also to @jrieken and moving to the next milestone to potentially look into it then |
related to #15702. There is two options: Hide items that will result in a no-op or make Enter insert a newline for those items |
@jrieken OMG awesome. I owe you at least one beer for this! |
**Bug** 89da6ab fixed microsoft#11944 by changing how enter works in completion providers. Now if the completion exactly matches the current text, pressing `enter` is not captured by the the suggestion widget. Instead it inserts a new line into the editor. This broke the jsdoc completion provider which uses `''` as a placeholder insertion before calculating the actual insertion upon being accepted. This weird behavior is because of a of the current tsserver api **Fix** Change the insert text to a single space instead. This seems to fix this issue in my testing.
* Fix JSDoc Completion Provider **Bug** 89da6ab fixed #11944 by changing how enter works in completion providers. Now if the completion exactly matches the current text, pressing `enter` is not captured by the the suggestion widget. Instead it inserts a new line into the editor. This broke the jsdoc completion provider which uses `''` as a placeholder insertion before calculating the actual insertion upon being accepted. This weird behavior is because of a of the current tsserver api **Fix** Change the insert text to a single space instead. This seems to fix this issue in my testing. * Slightly more elegant fix
If I have a variable, say
set
, and typeset
in the debug console, then the completions popup is visible withset
and any other completions. Then the user has to press enter twice - once to close the completions popup, and again to evalset
.I think that if the user has typed the full name of the completion, then pressing enter once should close the popup and eval that value. But if the user only types part of the completion like
se
, it should work as it does now.The text was updated successfully, but these errors were encountered: