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

Pressing Enter in a list when there are autocomplete options but not "Accept Suggestion On Enter" does not continue the list #1367

Closed
dan-nectry opened this issue Dec 8, 2023 · 4 comments
Labels
Area: List editing List editing: continuation, numbering, toggling, etc. Issue: Enhancement Improvements in existing features.

Comments

@dan-nectry
Copy link

What's the problem

Pressing enter in a list when there are autocomplete options but "Accept Suggestion On Enter" is set to off does not continue the list. For instance, in a bulleted list, pressing enter will not make a new bullet on the next line.

What's the expected result

Since "Accept Suggestion On Enter" if off, I would expect that, regardless of whether there are autocomplete suggestions available, pressing enter would create a new line with list formatting.

How to reproduce

  1. Set "Accept Suggestion On Enter" to "off"
  2. With the language set to Markdown, start a list (either bulleted or numbered).
  3. Have the last word of a line of the list have autocomplete options. Do not accept any of these options. Do not escape or otherwise cancel the autocomplete.
  4. Press enter.
@dan-nectry
Copy link
Author

@yzhang-gh Is there any more info you need to categorize/triage this problem? Or, is this a known bug that I didn't manage to find in the issue tracker?

@yzhang-gh
Copy link
Owner

Thanks for your feedback, and sorry I actually have read this but forgot to reply.

This is possible as the "continuing list" command won't be invoked if the suggest widget is visible

"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/ && !suggestWidgetVisible && !editorHasMultipleSelections && vim.mode != 'Normal' && vim.mode != 'Visual' && vim.mode != 'VisualBlock' && vim.mode != 'VisualLine' && vim.mode != 'SearchInProgressMode' && vim.mode != 'CommandlineInProgress' && vim.mode != 'Replace' && vim.mode != 'EasyMotionMode' && vim.mode != 'EasyMotionInputMode' && vim.mode != 'SurroundInputMode' && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv"

It was impossible to access user settings in the static package.json but fortunately should be okay in the recent VS Code versions.
I will need some time to check it and hopefully it can be fixed in this weekend, when I plan to release a new version of this extension.

@yzhang-gh yzhang-gh added Issue: Enhancement Improvements in existing features. Area: List editing List editing: continuation, numbering, toggling, etc. labels Dec 19, 2023
yzhang-gh added a commit that referenced this issue Dec 25, 2023
@yzhang-gh
Copy link
Owner

You can try it out using the latest dev build
https://github.com/yzhang-gh/vscode-markdown/actions/runs/7322269176/artifacts/1134210918

@peaceshi

This comment was marked as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: List editing List editing: continuation, numbering, toggling, etc. Issue: Enhancement Improvements in existing features.
Projects
None yet
Development

No branches or pull requests

3 participants