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

A line break within a code block results in two lines #3270

Closed
doraemoon-bot opened this issue Aug 17, 2022 · 2 comments
Closed

A line break within a code block results in two lines #3270

doraemoon-bot opened this issue Aug 17, 2022 · 2 comments
Labels
bug We can reproduce the issue and confirmed it is a bug. codewhisperer

Comments

@doraemoon-bot
Copy link

doraemoon-bot commented Aug 17, 2022

Describe the bug
When this plugin is enabled, creating a block of code (e.g. if (someCondition) {}) and breaking a line in braces will break two lines.

To reproduce

  1. Open a javascript file (or typescript file).
  2. Enter code block on a single line. (e.g. if (someCondition) {})
  3. Press Enter within braces.
  4. Bug : Line breaks will be on two lines.
if (someCondition) {
// expected blank line
// not needed
}

Expected behavior
If a line break occurs within the braces, it will be a single line break.

// before
if (someCondition) {}

// press `Enter` within braces
if (someCondition) {

}

Screenshots

  • Enter code block on a single line.
    screenshot 2022-08-17 13 18 34
  • Press Enter within braces. (Doc comment at the end of the line)
    screenshot  2022-08-17 13 12 22

Your Environment

  • OS: macOS Monterey 12.5
  • JetBrains product: WebStorm 2022.2 #WS-222.3345.108
  • AWS Toolkit version: 1.49-222
@doraemoon-bot doraemoon-bot added the bug We can reproduce the issue and confirmed it is a bug. label Aug 17, 2022
@e-rich18
Copy link

I am able to reproduce this even with Code Whisperer (and all experimental features) disabled. Only way to fix it was to disable the whole plugin.

@rli
Copy link
Contributor

rli commented Aug 24, 2022

Released in 1.50

@rli rli closed this as completed Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug We can reproduce the issue and confirmed it is a bug. codewhisperer
Projects
None yet
Development

No branches or pull requests

4 participants