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

Fix repositioning the cursor at the end of a range format #10938

Merged
merged 4 commits into from May 23, 2021

Conversation

j-f1
Copy link
Member

@j-f1 j-f1 commented May 23, 2021

Description

This fixes a small annoyance I’ve encountered using VS Code’s format-on-paste feature:

const x = myFunction(); // copy `myFunction`
const y = <|>/* paste `myFunction` here */

expected behavior:

const y = myFunction<|>;

actual behavior:

const y = myFunction;<|>

Checklist

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@sosukesuzuki sosukesuzuki merged commit 261bb03 into prettier:main May 23, 2021
@j-f1 j-f1 deleted the semicolon-placement branch May 23, 2021 18:55
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants