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

Autoindent on paste fails when first line of clipboard is a comment #201420

Open
russelldavis opened this issue Dec 23, 2023 · 0 comments · May be fixed by #201421
Open

Autoindent on paste fails when first line of clipboard is a comment #201420

russelldavis opened this issue Dec 23, 2023 · 0 comments · May be fixed by #201421
Assignees
Labels
editor-autoindent Editor auto indentation issues javascript JavaScript support issues on-unit-test under-discussion Issue is under discussion for relevance, priority, approach

Comments

@russelldavis
Copy link
Contributor

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.85.1
  • OS Version: Darwin arm64 22.6.0

Steps to Reproduce:

  1. Ensure the Editor: Auto Indent setting is set to "full"
  2. Add the following to a .js file:
// comment
const foo = 42

function bar() {

    console.log("bar")
}
  1. Copy the the first two lines to the clipboard
  2. Put the cursor on the empty line inside the bar function
  3. Paste from the clipboard

Expected: The two pasted lines should be autoindented inside the function
Actual: The lines are not auto indented, they retain their original indent of 0

This only happens when the first line being pasted is a comment.

@rebornix rebornix added editor-autoindent Editor auto indentation issues under-discussion Issue is under discussion for relevance, priority, approach labels Jan 2, 2024
@aiday-mar aiday-mar assigned aiday-mar and unassigned rebornix Mar 8, 2024
@aiday-mar aiday-mar added the javascript JavaScript support issues label Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor-autoindent Editor auto indentation issues javascript JavaScript support issues on-unit-test under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants