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

Pasting now forces tokenization #213652

Closed
alexdima opened this issue May 28, 2024 · 0 comments · Fixed by #213674
Closed

Pasting now forces tokenization #213652

alexdima opened this issue May 28, 2024 · 0 comments · Fixed by #213674
Assignees
Labels
editor-autoindent Editor auto indentation issues insiders-released Patch has been released in VS Code Insiders regression Something that used to work is now broken
Milestone

Comments

@alexdima
Copy link
Member

Found while verifying #209418

  • Download checker.ts
  • scroll to the bottom
  • select and place in clipboard (notice the bad leading indent):
reportInferenceFallback(node: Node): void {
        if (this.inner?.reportInferenceFallback) {
            this.inner.reportInferenceFallback(node);
        }
    }
  • make some room (newlines) without indentation for where to paste
  • reload the window
  • paste
  • 🐛 observe that the window freezes until tokenization occurs
  • this is because tokenization is forced when it is not cheap
  • this use-case is something to keep in mind when new calls to forceTokenization are added.

insiders

Kapture.2024-05-28.at.12.40.39.mp4

stable 1.89.1

Kapture.2024-05-28.at.12.39.19.mp4

cc @hediet

@alexdima alexdima added the regression Something that used to work is now broken label May 28, 2024
@alexdima alexdima added this to the May 2024 milestone May 28, 2024
@aiday-mar aiday-mar added the editor-autoindent Editor auto indentation issues label May 28, 2024
@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels May 28, 2024
@microsoft microsoft locked and limited conversation to collaborators Jul 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-autoindent Editor auto indentation issues insiders-released Patch has been released in VS Code Insiders regression Something that used to work is now broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants